kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 6bedcdb0c47275210a8b3998b0dc7165e4e40f5e4a0afff8fd9bccfc29136f71 |
|---|---|
| Author | Olivier Michallat <olim7t@users.noreply.github.com> · 2016-07-20 10:40 -07:00 |
| Committer | GitHub <noreply@github.com> · 2016-07-20 10:40 -07:00 |
| Parents | 87dc28d80ecc, a235f3a0eb7f |
6 files changed
modified build.yaml +1 −1
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | - 2.1 |
| 11 | 11 | - 2.2 |
| 12 | 12 | - 3.0 |
| 13 | - - 3.4 | |
| 13 | + - 3.7 | |
| 14 | 14 | build: |
| 15 | 15 | - type: maven |
| 16 | 16 | version: 3.2.5 |
modified ci/appveyor.yml +1 −1
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | environment: |
| 2 | 2 | test_profile: default |
| 3 | - cassandra_version: 3.5 | |
| 3 | + cassandra_version: 3.7 | |
| 4 | 4 | matrix: |
| 5 | 5 | - java_version: 1.6.0 |
| 6 | 6 | - java_version: 1.7.0 |
modified driver-core/src/test/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGeneratorTest.java +3 −2
| @@ -100,8 +100,9 @@ | ||
| 100 | 100 | .containsOnlyOnce("Clock skew detected:") |
| 101 | 101 | .containsOnlyOnce(String.format(logFormat, start - 1, 1, start)); |
| 102 | 102 | |
| 103 | - // Wait for a second to see if we get an additional clock skew message. | |
| 104 | - Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); | |
| 103 | + // Wait for 1.1 seconds to see if we get an additional clock skew message. We wait slightly longer | |
| 104 | + // than 1 second to deal with system clock precision on platforms like windows. | |
| 105 | + Uninterruptibles.sleepUninterruptibly(1100, TimeUnit.MILLISECONDS); | |
| 105 | 106 | |
| 106 | 107 | next = generator.next(); |
| 107 | 108 | assertThat(next).isEqualTo(previous + 1); |
modified driver-core/src/test/java/com/datastax/driver/core/WarningsTest.java +8 −7
| @@ -25,11 +25,6 @@ | ||
| 25 | 25 | |
| 26 | 26 | public class WarningsTest extends CCMTestsSupport { |
| 27 | 27 | |
| 28 | - /** | |
| 29 | - * This is Cassandra's default value, found in o.a.c.config.Config | |
| 30 | - */ | |
| 31 | - private static final int BATCH_SIZE_WARN_THRESHOLD_IN_BYTES = 5 * 1024; | |
| 32 | - | |
| 33 | 28 | @Override |
| 34 | 29 | public void onTestContextInitialized() { |
| 35 | 30 | execute("CREATE TABLE foo(k int primary key, v text)"); |
| @@ -38,8 +33,14 @@ | ||
| 38 | 33 | @CassandraVersion(major = 2.2) |
| 39 | 34 | @Test(groups = "short") |
| 40 | 35 | public void should_expose_warnings_on_execution_info() { |
| 41 | - ResultSet rs = session().execute(String.format("BEGIN UNLOGGED BATCH INSERT INTO foo (k, v) VALUES (1, '%s') APPLY BATCH", | |
| 42 | - Strings.repeat("1", BATCH_SIZE_WARN_THRESHOLD_IN_BYTES))); | |
| 36 | + // the default batch size warn threshold is 5 * 1024 bytes, but after CASSANDRA-10876 there must be | |
| 37 | + // multiple mutations in a batch to trigger this warning so the batch includes 2 different inserts. | |
| 38 | + ResultSet rs = session().execute(String.format("BEGIN UNLOGGED BATCH\n" + | |
| 39 | + "INSERT INTO foo (k, v) VALUES (1, '%s')\n" + | |
| 40 | + "INSERT INTO foo (k, v) VALUES (2, '%s')\n" + | |
| 41 | + "APPLY BATCH", | |
| 42 | + Strings.repeat("1", 2 * 1024), | |
| 43 | + Strings.repeat("1", 3 * 1024))); | |
| 43 | 44 | |
| 44 | 45 | List<String> warnings = rs.getExecutionInfo().getWarnings(); |
| 45 | 46 | assertThat(warnings).hasSize(1); |
modified driver-tests/osgi/pom.xml +1 −1
| @@ -31,7 +31,7 @@ | ||
| 31 | 31 | |
| 32 | 32 | <properties> |
| 33 | 33 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 34 | - <felix.version>4.6.0</felix.version> | |
| 34 | + <felix.version>4.4.1</felix.version> | |
| 35 | 35 | <!-- more recent version require JDK7+ --> |
| 36 | 36 | <pax-exam.version>3.6.0</pax-exam.version> |
| 37 | 37 | <url.version>2.4.0</url.version> |
modified driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +13 −1
| @@ -18,12 +18,15 @@ | ||
| 18 | 18 | import com.datastax.driver.core.CCMBridge; |
| 19 | 19 | import com.datastax.driver.core.ProtocolOptions; |
| 20 | 20 | import com.datastax.driver.core.TestUtils; |
| 21 | +import com.google.common.collect.Lists; | |
| 21 | 22 | import org.ops4j.pax.exam.Option; |
| 22 | 23 | import org.ops4j.pax.exam.options.CompositeOption; |
| 23 | 24 | import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; |
| 24 | 25 | import org.ops4j.pax.exam.options.UrlProvisionOption; |
| 25 | 26 | import org.ops4j.pax.exam.util.PathUtils; |
| 26 | 27 | |
| 28 | +import java.util.List; | |
| 29 | + | |
| 27 | 30 | import static com.datastax.driver.osgi.VersionProvider.projectVersion; |
| 28 | 31 | import static org.ops4j.pax.exam.CoreOptions.*; |
| 29 | 32 | |
| @@ -115,7 +118,7 @@ | ||
| 115 | 118 | |
| 116 | 119 | @Override |
| 117 | 120 | public Option[] getOptions() { |
| 118 | - return options( | |
| 121 | + List<Option> options = Lists.newArrayList( | |
| 119 | 122 | // Delegate javax.security.cert to the parent classloader. javax.security.cert.X509Certificate is used in |
| 120 | 123 | // io.netty.util.internal.EmptyArrays, but not directly by the driver. |
| 121 | 124 | bootDelegationPackage("javax.security.cert"), |
| @@ -130,6 +133,15 @@ | ||
| 130 | 133 | systemPackages("org.testng", "org.junit", "org.junit.runner", "org.junit.runner.manipulation", |
| 131 | 134 | "org.junit.runner.notification", "com.jcabi.manifests") |
| 132 | 135 | ); |
| 136 | + if (CCMBridge.isWindows()) { | |
| 137 | + // Workaround for Felix + Windows Server 2012. Felix does not properly alias 'windowsserver2012' | |
| 138 | + // to 'win32', because of this some native libraries may fail to load. To work around this, force | |
| 139 | + // the os.name property to win32 if on a windows platform. | |
| 140 | + // See: https://issues.apache.org/jira/browse/FELIX-5184 | |
| 141 | + options.add(systemProperty("os.name").value("win32")); | |
| 142 | + } | |
| 143 | + | |
| 144 | + return options.toArray(new Option[options.size()]); | |
| 133 | 145 | } |
| 134 | 146 | }; |
| 135 | 147 | } |