Elffuss BraidHub

kikocis/java-driver public

Merge branch '2.0' into 2.1
Changesetee4e8586c27877d9a211e350bcb7e02d5e126265cbe23e5b55f0e8e288ce9e9c
AuthorAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-11-13 10:41 -06:00
CommitterAndrew Tolbert <andrew.tolbert@datastax.com> · 2015-11-13 10:41 -06:00
Parentse0535ea4aa45, 66fedda017c4

Browse the files at this changeset

6 files changed

modified build.yaml +13 −1
@@ -11,12 +11,24 @@
1111 build:
1212 - type: maven
1313 version: 3.2.5
14- goals: clean compile test --fail-never -Plong
14+ goals: verify --fail-never -Plong
1515 properties: |
1616 com.datastax.driver.TEST_BASE_NODE_WAIT=120
1717 com.datastax.driver.NEW_NODE_DELAY_SECONDS=100
1818 cassandra.version=$CCM_CASSANDRA_VERSION
1919 ccm.java.home=$CCM_JAVA_HOME
20+ failIfNoTests=false
21+ maven.test.failure.ignore=true
22+ - type: maven
23+ version: 3.2.5
24+ goals: verify --fail-never -Pisolated
25+ properties: |
26+ com.datastax.driver.TEST_BASE_NODE_WAIT=120
27+ com.datastax.driver.NEW_NODE_DELAY_SECONDS=100
28+ cassandra.version=$CCM_CASSANDRA_VERSION
29+ ccm.java.home=$CCM_JAVA_HOME
30+ failIfNoTests=false
31+ maven.test.failure.ignore=true
2032 - xunit:
2133 - "**/target/surefire-reports/TEST-*.xml"
2234 - "**/target/failsafe-reports/TEST-*.xml"
modified driver-core/pom.xml +35 −0
@@ -340,6 +340,41 @@
340340 </build>
341341 </profile>
342342
343+ <profile>
344+ <id>isolated</id>
345+ <properties>
346+ <env>default</env>
347+ </properties>
348+ <build>
349+ <plugins>
350+ <plugin>
351+ <groupId>org.apache.maven.plugins</groupId>
352+ <artifactId>maven-surefire-plugin</artifactId>
353+ <version>2.16</version>
354+ <configuration>
355+ <forkCount>1</forkCount>
356+ <reuseForks>false</reuseForks>
357+ <groups>isolated</groups>
358+ <!-- Files containing tests to be included must be added here.
359+ this prevents a fork being created for each test class. -->
360+ <includes>
361+ <include>**/SSL*Test.java</include>
362+ </includes>
363+ <reportNameSuffix>isolated</reportNameSuffix>
364+ <useFile>false</useFile>
365+ <systemPropertyVariables>
366+ <cassandra.version>${cassandra.version}</cassandra.version>
367+ <ipprefix>${ipprefix}</ipprefix>
368+ </systemPropertyVariables>
369+ <classpathDependencyExcludes>
370+ <classpathDependencyExcludes>io.netty:netty-transport-native-epoll</classpathDependencyExcludes>
371+ </classpathDependencyExcludes>
372+ </configuration>
373+ </plugin>
374+ </plugins>
375+ </build>
376+ </profile>
377+
343378 <profile>
344379 <id>long</id>
345380 <properties>
modified driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +2 −2
@@ -431,13 +431,13 @@
431431 erroredOut = true;
432432 }
433433
434- @BeforeClass(groups = { "short", "long" })
434+ @BeforeClass(groups = { "isolated", "short", "long" })
435435 public void beforeClass() {
436436 maybeInitCluster();
437437 initKeyspace();
438438 }
439439
440- @AfterClass(groups = { "short", "long" })
440+ @AfterClass(groups = { "isolated", "short", "long" })
441441 public void afterClass() {
442442 try {
443443 clearSimpleKeyspace();
modified driver-core/src/test/java/com/datastax/driver/core/SSLAuthenticatedEncryptionTest.java +6 −10
@@ -67,17 +67,13 @@
6767 * @test_category connection:ssl, authentication
6868 * @expected_result Connection can be established.
6969 */
70- @Test(groups="short")
70+ @Test(groups="isolated")
7171 public void should_use_system_properties_with_default_ssl_options() throws Exception {
72- try {
73- System.setProperty("javax.net.ssl.keyStore", DEFAULT_CLIENT_KEYSTORE_FILE.getAbsolutePath());
74- System.setProperty("javax.net.ssl.keyStorePassword", DEFAULT_CLIENT_KEYSTORE_PASSWORD);
75- System.setProperty("javax.net.ssl.trustStore", DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath());
76- System.setProperty("javax.net.ssl.trustStorePassword", DEFAULT_CLIENT_TRUSTSTORE_PASSWORD);
72+ System.setProperty("javax.net.ssl.keyStore", DEFAULT_CLIENT_KEYSTORE_FILE.getAbsolutePath());
73+ System.setProperty("javax.net.ssl.keyStorePassword", DEFAULT_CLIENT_KEYSTORE_PASSWORD);
74+ System.setProperty("javax.net.ssl.trustStore", DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath());
75+ System.setProperty("javax.net.ssl.trustStorePassword", DEFAULT_CLIENT_TRUSTSTORE_PASSWORD);
7776
78- connectWithSSL();
79- } finally {
80- clearSystemProperties();
81- }
77+ connectWithSSL();
8278 }
8379 }
modified driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java +4 −8
@@ -126,15 +126,11 @@
126126 * @test_category connection:ssl
127127 * @expected_result Connection can be established.
128128 */
129- @Test(groups="short")
129+ @Test(groups="isolated")
130130 public void should_use_system_properties_with_default_ssl_options() throws Exception {
131- try {
132- System.setProperty("javax.net.ssl.trustStore", DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath());
133- System.setProperty("javax.net.ssl.trustStorePassword", DEFAULT_CLIENT_TRUSTSTORE_PASSWORD);
131+ System.setProperty("javax.net.ssl.trustStore", DEFAULT_CLIENT_TRUSTSTORE_FILE.getAbsolutePath());
132+ System.setProperty("javax.net.ssl.trustStorePassword", DEFAULT_CLIENT_TRUSTSTORE_PASSWORD);
134133
135- connectWithSSL();
136- } finally {
137- clearSystemProperties();
138- }
134+ connectWithSSL();
139135 }
140136 }
modified driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java +2 −12
@@ -39,14 +39,14 @@
3939 this.requireClientAuth = requireClientAuth;
4040 }
4141
42- @BeforeClass(groups={"short", "long"})
42+ @BeforeClass(groups={"isolated", "short", "long"})
4343 public void beforeClass() {
4444 ccm = CCMBridge.builder("test")
4545 .withSSL(requireClientAuth)
4646 .build();
4747 }
4848
49- @AfterClass(groups={"short", "long"})
49+ @AfterClass(groups={"isolated", "short", "long"})
5050 public void afterClass() {
5151 ccm.remove();
5252 }
@@ -100,16 +100,6 @@
100100 }
101101 }
102102
103- /**
104- * Clears all System properties associated with SSL key and trust stores.
105- */
106- protected void clearSystemProperties() {
107- System.clearProperty("javax.net.ssl.keyStore");
108- System.clearProperty("javax.net.ssl.keyStorePassword");
109- System.clearProperty("javax.net.ssl.trustStore");
110- System.clearProperty("javax.net.ssl.trustStorePassword");
111- }
112-
113103 /**
114104 * @param keyStorePath Path to keystore, if absent is not used.
115105 * @param trustStorePath Path to truststore, if absent is not used.