Skip to content

Commit

Permalink
Fix test suite order (#1593)
Browse files Browse the repository at this point in the history
* test: Standardize on array of tests in @SuiteClasses

* test: Fix sort order for test suites

* docs: Add note about sorting tests to GitHub PR template
  • Loading branch information
sehrope authored and davecramer committed Oct 29, 2019
1 parent 7c59126 commit 003ea83
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Expand Up @@ -9,7 +9,7 @@

1. [ ] Does your submission pass tests?
2. [ ] Does mvn checkstyle:check pass ?
3. [ ] Have you added your new test classes to an existing test suite?
3. [ ] Have you added your new test classes to an existing test suite in alphabetical order?

### Changes to Existing Features:

Expand Down
Expand Up @@ -12,7 +12,9 @@
* Executes all known tests for PostgreSQL extensions supported by JDBC driver
*/
@RunWith(Suite.class)
@Suite.SuiteClasses(HStoreTest.class)
@Suite.SuiteClasses({
HStoreTest.class,
})
public class ExtensionsTestSuite {
}

Expand Up @@ -12,6 +12,8 @@
* Executes multi host tests (aka master/slave connectivity selection).
*/
@RunWith(Suite.class)
@Suite.SuiteClasses(MultiHostsConnectionTest.class)
@Suite.SuiteClasses({
MultiHostsConnectionTest.class,
})
public class MultiHostTestSuite {
}
Expand Up @@ -15,13 +15,15 @@
* @author Aaron Mulder (ammulder@chariotsolutions.com)
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({SimpleDataSourceTest.class,
SimpleDataSourceWithUrlTest.class,
SimpleDataSourceWithSetURLTest.class,
@Suite.SuiteClasses({
BaseDataSourceFailoverUrlsTest.class,
CaseOptimiserDataSourceTest.class,
ConnectionPoolTest.class,
PoolingDataSourceTest.class,
CaseOptimiserDataSourceTest.class,
BaseDataSourceFailoverUrlsTest.class})
SimpleDataSourceTest.class,
SimpleDataSourceWithSetURLTest.class,
SimpleDataSourceWithUrlTest.class,
})
public class OptionalTestSuite {

}
Expand Up @@ -15,10 +15,10 @@
GetObject310InfinityTests.class,
GetObject310Test.class,
Jdbc42CallableStatementTest.class,
LargeCountJdbc42Test.class,
PreparedStatementTest.class,
SetObject310Test.class,
SimpleJdbc42Test.class,
LargeCountJdbc42Test.class
})
public class Jdbc42TestSuite {

Expand Down
Expand Up @@ -13,6 +13,8 @@
* Twitter: @codefinger
*/
@RunWith(Suite.class)
@Suite.SuiteClasses({SocksProxyTest.class})
@Suite.SuiteClasses({
SocksProxyTest.class,
})
public class Jre8TestSuite {
}
Expand Up @@ -10,7 +10,9 @@
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({PGDataSourceFactoryTest.class})
@SuiteClasses({
PGDataSourceFactoryTest.class,
})
public class OsgiTestSuite {

}
Expand Up @@ -11,9 +11,9 @@
@RunWith(Suite.class)
@Suite.SuiteClasses({
CommonNameVerifierTest.class,
LazyKeyManagerTest.class,
LibPQFactoryHostNameTest.class,
SslTest.class,
LazyKeyManagerTest.class,
})
public class SslTestSuite {
}
4 changes: 3 additions & 1 deletion pgjdbc/src/test/java/org/postgresql/test/xa/XATestSuite.java
Expand Up @@ -9,6 +9,8 @@
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses(XADataSourceTest.class)
@Suite.SuiteClasses({
XADataSourceTest.class,
})
public class XATestSuite {
}

0 comments on commit 003ea83

Please sign in to comment.