Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2023
1 parent 323fbb7 commit 2e2d7fc
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions prql-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<sqlite-jdbc.version>3.40.1.0</sqlite-jdbc.version>
<testcontainers.version>1.17.6</testcontainers.version>
<!-- stay with 7.5 for JDK 8 support -->
<testng.version>7.5</testng.version>
<testing.version>7.5</testing.version>

<compiler-plugin.version>3.10.1</compiler-plugin.version>
<deploy-plugin.version>3.0.0</deploy-plugin.version>
Expand Down Expand Up @@ -140,9 +140,9 @@
<version>${testcontainers.version}</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<groupId>org.testing</groupId>
<artifactId>testing</artifactId>
<version>${testing.version}</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
Expand Down
4 changes: 2 additions & 2 deletions prql-java/prql-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<groupId>org.testing</groupId>
<artifactId>testing</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import java.util.ArrayList;
import java.util.List;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.testing.Assert;
import org.testing.annotations.DataProvider;
import org.testing.annotations.Test;

public abstract class ApiImplTest {
protected abstract PrqlApi newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import org.prqllang.ApiImplTest;
import org.prqllang.PrqlApi;
import org.testng.Assert;
import org.testing.Assert;

public class CommandLineImplTest extends ApiImplTest {
private Properties getTestConfig() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.prqllang.ApiImplTest;
import org.prqllang.PrqlApi;
import org.prqllang.PrqlCompileOption;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.testing.Assert;
import org.testing.annotations.Test;

public class JniImplTest extends ApiImplTest {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.io.IOException;
import java.lang.reflect.Field;

import org.testng.Assert;
import org.testng.annotations.Test;
import org.testing.Assert;
import org.testing.annotations.Test;

public class UtilsTest {
@Test
Expand Down
4 changes: 2 additions & 2 deletions prql-java/prql-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<groupId>org.testing</groupId>
<artifactId>testing</artifactId>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;

import org.testng.Assert;
import org.testng.annotations.Test;
import org.testing.Assert;
import org.testing.annotations.Test;

public class CustomClassLoaderTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import java.sql.Statement;
import java.util.Properties;

import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.testing.Assert;
import org.testing.annotations.BeforeClass;
import org.testing.annotations.DataProvider;
import org.testing.annotations.Test;

public class PrqlDriverTest {
@BeforeClass
Expand Down Expand Up @@ -39,21 +39,21 @@ public void testNewDriver() throws SQLException {

PrqlDriver prqlDriver = (PrqlDriver) DriverManager.getDriver(invalidUrl);
int len = prqlDriver.getPropertyInfo(invalidUrl, props).length;
Assert.assertTrue(len > 0, "Shoud have at least one property");
Assert.assertTrue(len > 0, "Should have at least one property");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(invalidUrl, props));

final String correctUrl = invalidUrl.replace("sxqlserver", "sqlserver");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length == len,
"Should have same amount of properies");
"Should have same amount of properties");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(correctUrl, props));

props.setProperty("prql.custom.classpath",
"https://repo1.maven.org/maven2/net/sourceforge/jtds/jtds/1.3.1/jtds-1.3.1.jar");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len, "Should have more properies");
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len, "Should have more properties");

props.clear();
Assert.assertTrue(prqlDriver.getPropertyInfo(correctUrl, props).length > len,
"Should have more properies due to cached driver");
"Should have more properties due to cached driver");
Assert.assertThrows(SQLException.class, () -> prqlDriver.connect(correctUrl, props));
}

Expand All @@ -68,7 +68,7 @@ public void testQuery(String url, String prql, String sql) throws SQLException {
while (rs.next()) {
count++;
}
// we're good, as long as no error occured in read
// we're good, as long as no error occurred in read
Assert.assertTrue(count >= 0L);
}

Expand Down

0 comments on commit 2e2d7fc

Please sign in to comment.