kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 1d6480b23c6f273d2a021f5571142a290c99e1fe0077e66c30de191132f39dfb |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-11-05 14:27 -06:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-11-05 14:27 -06:00 |
| Parents | 08758edd9a11, afa9ec7b29c7 |
10 files changed
modified changelog/README.md +2 −0
| @@ -6,6 +6,8 @@ | ||
| 6 | 6 | - [improvement] Update metrics to the latest version (JAVA-968) |
| 7 | 7 | - [improvement] Improve error handling for when a non-type 1 UUID is given to bind() on a timeuuid column (JAVA-965) |
| 8 | 8 | - [improvement] Pass the authenticator name from the server to the auth provider (JAVA-885) |
| 9 | +- [improvement] Raise an exception when an older version of guava (<16.01) is found (JAVA-961) | |
| 10 | + | |
| 9 | 11 | |
| 10 | 12 | ### 3.0.0-alpha4 |
| 11 | 13 |
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +5 −0
| @@ -66,6 +66,11 @@ | ||
| 66 | 66 | |
| 67 | 67 | private static final Logger logger = LoggerFactory.getLogger(Cluster.class); |
| 68 | 68 | |
| 69 | + static { | |
| 70 | + // Perform sanity checks to inform user of possible environment misconfiguration. | |
| 71 | + SanityChecks.check(); | |
| 72 | + } | |
| 73 | + | |
| 69 | 74 | @VisibleForTesting |
| 70 | 75 | static final int NEW_NODE_DELAY_SECONDS = SystemProperties.getInt("com.datastax.driver.NEW_NODE_DELAY_SECONDS", 1); |
| 71 | 76 | private static final int NON_BLOCKING_EXECUTOR_SIZE = SystemProperties.getInt("com.datastax.driver.NON_BLOCKING_EXECUTOR_SIZE", |
added driver-core/src/main/java/com/datastax/driver/core/SanityChecks.java +69 −0
| @@ -0,0 +1,69 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +package com.datastax.driver.core; | |
| 17 | + | |
| 18 | +import java.lang.reflect.ParameterizedType; | |
| 19 | +import java.lang.reflect.Type; | |
| 20 | +import java.util.Map; | |
| 21 | + | |
| 22 | +import com.google.common.reflect.TypeToken; | |
| 23 | + | |
| 24 | +class SanityChecks { | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * Performs a series of runtime checks to ensure the environment does not have any | |
| 28 | + * incompatible libraries or configurations. Depending on the severity of an | |
| 29 | + * incompatibility an {@link IllegalStateException} may be thrown or an ERROR or | |
| 30 | + * WARNING is logged. | |
| 31 | + * | |
| 32 | + * @throws IllegalStateException If an environment incompatibility is detected. | |
| 33 | + * @see #checkGuava | |
| 34 | + */ | |
| 35 | + static void check() { | |
| 36 | + checkGuava(); | |
| 37 | + } | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * Detects if a version of guava older than 16.01 is present by attempting to create | |
| 41 | + * a {@link TypeToken} instance for <code>Map<String,String></code> and ensures that the | |
| 42 | + * value type argument is of instance {@link String}. If using an older version of guava | |
| 43 | + * this will resolve to {@link Object} instead. In this case an {@link IllegalStateException} | |
| 44 | + * is thrown. | |
| 45 | + * | |
| 46 | + * @throws IllegalStateException if version of guava less than 16.01 is detected. | |
| 47 | + */ | |
| 48 | + static void checkGuava() { | |
| 49 | + boolean resolved = false; | |
| 50 | + TypeToken<Map<String,String>> mapOfString = CodecUtils.mapOf(String.class, String.class); | |
| 51 | + Type type = mapOfString.getType(); | |
| 52 | + if(type instanceof ParameterizedType) { | |
| 53 | + ParameterizedType pType = (ParameterizedType)type; | |
| 54 | + Type[] types = pType.getActualTypeArguments(); | |
| 55 | + if(types.length == 2) { | |
| 56 | + TypeToken valueType = TypeToken.of(types[1]); | |
| 57 | + resolved = valueType.getRawType().equals(String.class); | |
| 58 | + } | |
| 59 | + } | |
| 60 | + | |
| 61 | + if(!resolved) { | |
| 62 | + throw new IllegalStateException( | |
| 63 | + "Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use. " | |
| 64 | + + "This introduces codec resolution issues and potentially other incompatibility issues in the driver. " | |
| 65 | + + "Please upgrade to Guava 16.01 or later."); | |
| 66 | + } | |
| 67 | + } | |
| 68 | + | |
| 69 | +} |
modified driver-examples/osgi/pom.xml +13 −14
| @@ -31,6 +31,7 @@ | ||
| 31 | 31 | <properties> |
| 32 | 32 | <felix.version>4.6.0</felix.version> |
| 33 | 33 | <pax-exam.version>3.6.0</pax-exam.version> |
| 34 | + <logback.version>1.1.3</logback.version> | |
| 34 | 35 | <main.basedir>${project.parent.parent.basedir}</main.basedir> |
| 35 | 36 | </properties> |
| 36 | 37 | |
| @@ -90,20 +91,6 @@ | ||
| 90 | 91 | <scope>test</scope> |
| 91 | 92 | </dependency> |
| 92 | 93 | |
| 93 | - <dependency> | |
| 94 | - <groupId>log4j</groupId> | |
| 95 | - <artifactId>log4j</artifactId> | |
| 96 | - <version>${log4j.version}</version> | |
| 97 | - <scope>test</scope> | |
| 98 | - </dependency> | |
| 99 | - | |
| 100 | - <dependency> | |
| 101 | - <groupId>org.slf4j</groupId> | |
| 102 | - <artifactId>slf4j-log4j12</artifactId> | |
| 103 | - <version>${slf4j-log4j12.version}</version> | |
| 104 | - <scope>test</scope> | |
| 105 | - </dependency> | |
| 106 | - | |
| 107 | 94 | <dependency> |
| 108 | 95 | <groupId>com.jcabi</groupId> |
| 109 | 96 | <artifactId>jcabi-manifests</artifactId> |
| @@ -131,6 +118,18 @@ | ||
| 131 | 118 | <version>1.3</version> |
| 132 | 119 | <scope>test</scope> |
| 133 | 120 | </dependency> |
| 121 | + | |
| 122 | + <dependency> | |
| 123 | + <groupId>ch.qos.logback</groupId> | |
| 124 | + <artifactId>logback-classic</artifactId> | |
| 125 | + <version>${logback.version}</version> | |
| 126 | + </dependency> | |
| 127 | + | |
| 128 | + <dependency> | |
| 129 | + <groupId>ch.qos.logback</groupId> | |
| 130 | + <artifactId>logback-core</artifactId> | |
| 131 | + <version>${logback.version}</version> | |
| 132 | + </dependency> | |
| 134 | 133 | </dependencies> |
| 135 | 134 | |
| 136 | 135 | <build> |
added driver-examples/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +86 −0
| @@ -0,0 +1,86 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +package com.datastax.driver.osgi; | |
| 17 | + | |
| 18 | +import org.ops4j.pax.exam.Option; | |
| 19 | +import org.ops4j.pax.exam.options.CompositeOption; | |
| 20 | +import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; | |
| 21 | +import org.ops4j.pax.exam.options.UrlProvisionOption; | |
| 22 | +import org.ops4j.pax.exam.util.PathUtils; | |
| 23 | + | |
| 24 | +import static org.ops4j.pax.exam.CoreOptions.bundle; | |
| 25 | +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; | |
| 26 | +import static org.ops4j.pax.exam.CoreOptions.options; | |
| 27 | +import static org.ops4j.pax.exam.CoreOptions.systemPackages; | |
| 28 | +import static org.ops4j.pax.exam.CoreOptions.systemProperty; | |
| 29 | + | |
| 30 | +import com.datastax.driver.core.CCMBridge; | |
| 31 | + | |
| 32 | +import static com.datastax.driver.osgi.VersionProvider.projectVersion; | |
| 33 | + | |
| 34 | +public class BundleOptions { | |
| 35 | + | |
| 36 | + public static UrlProvisionOption driverBundle() { | |
| 37 | + return driverBundle(false); | |
| 38 | + } | |
| 39 | + | |
| 40 | + public static UrlProvisionOption driverBundle(boolean useShaded) { | |
| 41 | + String classifier = useShaded ? "-shaded" : ""; | |
| 42 | + return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-core/target/cassandra-driver-core-" + projectVersion() + classifier + ".jar"); | |
| 43 | + } | |
| 44 | + | |
| 45 | + public static MavenArtifactProvisionOption guavaBundle() { | |
| 46 | + return mavenBundle("com.google.guava", "guava", "16.0.1"); | |
| 47 | + } | |
| 48 | + | |
| 49 | + public static CompositeOption nettyBundles() { | |
| 50 | + final String nettyVersion = "4.0.27.Final"; | |
| 51 | + return new CompositeOption() { | |
| 52 | + | |
| 53 | + @Override public Option[] getOptions() { | |
| 54 | + return options( | |
| 55 | + mavenBundle("io.netty", "netty-buffer", nettyVersion), | |
| 56 | + mavenBundle("io.netty", "netty-codec", nettyVersion), | |
| 57 | + mavenBundle("io.netty", "netty-common", nettyVersion), | |
| 58 | + mavenBundle("io.netty", "netty-handler", nettyVersion), | |
| 59 | + mavenBundle("io.netty", "netty-transport", nettyVersion) | |
| 60 | + ); | |
| 61 | + } | |
| 62 | + }; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public static UrlProvisionOption mailboxBundle() { | |
| 66 | + return bundle("reference:file:" + PathUtils.getBaseDir() + "/target/classes"); | |
| 67 | + } | |
| 68 | + | |
| 69 | + public static CompositeOption defaultOptions() { | |
| 70 | + return new CompositeOption() { | |
| 71 | + | |
| 72 | + @Override public Option[] getOptions() { | |
| 73 | + return options( | |
| 74 | + systemProperty("cassandra.contactpoints").value(CCMBridge.IP_PREFIX + 1), | |
| 75 | + systemProperty("logback.configurationFile").value("file:" + PathUtils.getBaseDir() + "/src/test/resources/logback.xml"), | |
| 76 | + mavenBundle("org.slf4j", "slf4j-api", "1.7.5"), | |
| 77 | + mavenBundle("ch.qos.logback", "logback-classic", "1.1.3"), | |
| 78 | + mavenBundle("ch.qos.logback", "logback-core", "1.1.3"), | |
| 79 | + mavenBundle("io.dropwizard.metrics", "metrics-core", "3.1.2"), | |
| 80 | + systemPackages("org.testng", "org.junit", "org.junit.runner", "org.junit.runner.manipulation", | |
| 81 | + "org.junit.runner.notification", "com.jcabi.manifests") | |
| 82 | + ); | |
| 83 | + } | |
| 84 | + }; | |
| 85 | + } | |
| 86 | +} |
added driver-examples/osgi/src/test/java/com/datastax/driver/osgi/GuavaSanityCheckNegativeIT.java +102 −0
| @@ -0,0 +1,102 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | + * | |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | + * you may not use this file except in compliance with the License. | |
| 6 | + * You may obtain a copy of the License at | |
| 7 | + * | |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | + * | |
| 10 | + * Unless required by applicable law or agreed to in writing, software | |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | + * See the License for the specific language governing permissions and | |
| 14 | + * limitations under the License. | |
| 15 | + */ | |
| 16 | +package com.datastax.driver.osgi; | |
| 17 | + | |
| 18 | +import org.ops4j.pax.exam.Configuration; | |
| 19 | +import org.ops4j.pax.exam.Option; | |
| 20 | +import org.ops4j.pax.exam.testng.listener.PaxExam; | |
| 21 | +import org.testng.annotations.Listeners; | |
| 22 | +import org.testng.annotations.Test; | |
| 23 | + | |
| 24 | +import static org.ops4j.pax.exam.CoreOptions.options; | |
| 25 | +import static org.testng.Assert.assertTrue; | |
| 26 | +import static org.testng.Assert.fail; | |
| 27 | + | |
| 28 | +import com.datastax.driver.core.Cluster; | |
| 29 | + | |
| 30 | +import static com.datastax.driver.osgi.BundleOptions.defaultOptions; | |
| 31 | +import static com.datastax.driver.osgi.BundleOptions.driverBundle; | |
| 32 | +import static com.datastax.driver.osgi.BundleOptions.guavaBundle; | |
| 33 | +import static com.datastax.driver.osgi.BundleOptions.nettyBundles; | |
| 34 | + | |
| 35 | +@Listeners({PaxExam.class}) | |
| 36 | +@Test(groups="short") | |
| 37 | +public class GuavaSanityCheckNegativeIT { | |
| 38 | + | |
| 39 | + @Configuration | |
| 40 | + public Option[] guava14_0_1Config() { | |
| 41 | + return options( | |
| 42 | + driverBundle(), | |
| 43 | + nettyBundles(), | |
| 44 | + guavaBundle().version("14.0.1"), | |
| 45 | + defaultOptions() | |
| 46 | + ); | |
| 47 | + } | |
| 48 | + | |
| 49 | + @Configuration | |
| 50 | + public Option[] guava15Config() { | |
| 51 | + return options( | |
| 52 | + driverBundle(), | |
| 53 | + nettyBundles(), | |
| 54 | + guavaBundle().version("15.0"), | |
| 55 | + defaultOptions() | |
| 56 | + ); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Configuration | |
| 60 | + public Option[] guava16Config() { | |
| 61 | + return options( | |
| 62 | + driverBundle(), | |
| 63 | + nettyBundles(), | |
| 64 | + guavaBundle().version("16.0"), | |
| 65 | + defaultOptions() | |
| 66 | + ); | |
| 67 | + } | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * <p> | |
| 71 | + * Validates that the driver is able to detect that the guava library in the classpath is | |
| 72 | + * less than version 16.01 and throws an {@link IllegalStateException} in this case and | |
| 73 | + * is raised as the cause of an {@link ExceptionInInitializerError} since the failure | |
| 74 | + * occurs at static initialization. | |
| 75 | + * </p> | |
| 76 | + * | |
| 77 | + * The following configurations are tried (defined via methods with the @Configuration annotation): | |
| 78 | + * <ol> | |
| 79 | + * <li>With Guava 14.0.1</li> | |
| 80 | + * <li>With Guava 15.0</li> | |
| 81 | + * <li>With Guava 16.0</li> | |
| 82 | + * </ol> | |
| 83 | + * | |
| 84 | + * @test_category packaging | |
| 85 | + * @expected_result An {@link IllegalStateException} is thrown. | |
| 86 | + * @jira_ticket JAVA-961 | |
| 87 | + * @since 3.0.0-beta1 | |
| 88 | + */ | |
| 89 | + public void should_raise_guava_version_error_if_lt_16_0_1() throws Throwable { | |
| 90 | + try { | |
| 91 | + Cluster.builder(); | |
| 92 | + fail("Expected an IllegalStateException for Guava version incompatibility"); | |
| 93 | + } | |
| 94 | + catch(ExceptionInInitializerError e) { | |
| 95 | + try { | |
| 96 | + throw e.getCause(); | |
| 97 | + } catch(IllegalStateException ise) { | |
| 98 | + assertTrue(ise.getMessage().contains("Detected Guava issue #1635")); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + } | |
| 102 | +} |
modified driver-examples/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceIT.java +7 −54
| @@ -22,78 +22,29 @@ | ||
| 22 | 22 | import javax.inject.Inject; |
| 23 | 23 | import org.ops4j.pax.exam.Configuration; |
| 24 | 24 | import org.ops4j.pax.exam.Option; |
| 25 | -import org.ops4j.pax.exam.options.CompositeOption; | |
| 26 | -import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; | |
| 27 | -import org.ops4j.pax.exam.options.UrlProvisionOption; | |
| 28 | 25 | import org.ops4j.pax.exam.testng.listener.PaxExam; |
| 29 | 26 | import org.testng.annotations.Listeners; |
| 30 | 27 | import org.testng.annotations.Test; |
| 31 | 28 | |
| 32 | -import static org.ops4j.pax.exam.CoreOptions.*; | |
| 29 | +import static org.ops4j.pax.exam.CoreOptions.options; | |
| 33 | 30 | import static org.testng.Assert.assertEquals; |
| 34 | 31 | |
| 35 | -import com.datastax.driver.core.CCMBridge; | |
| 36 | 32 | import com.datastax.driver.osgi.api.MailboxException; |
| 37 | 33 | import com.datastax.driver.osgi.api.MailboxMessage; |
| 38 | 34 | import com.datastax.driver.osgi.api.MailboxService; |
| 39 | 35 | |
| 40 | -import static com.datastax.driver.osgi.VersionProvider.projectVersion; | |
| 36 | +import static com.datastax.driver.osgi.BundleOptions.*; | |
| 41 | 37 | |
| 42 | 38 | @Listeners({CCMBridgeListener.class, PaxExam.class}) |
| 43 | 39 | @Test(groups="short") |
| 44 | 40 | public class MailboxServiceIT { |
| 45 | 41 | @Inject MailboxService service; |
| 46 | 42 | |
| 47 | - private UrlProvisionOption driverBundle() { | |
| 48 | - return driverBundle(false); | |
| 49 | - } | |
| 50 | - | |
| 51 | - private UrlProvisionOption driverBundle(boolean useShaded) { | |
| 52 | - String classifier = useShaded ? "-shaded" : ""; | |
| 53 | - return bundle("reference:file:../../driver-core/target/cassandra-driver-core-" + projectVersion() + classifier + ".jar"); | |
| 54 | - } | |
| 55 | - | |
| 56 | - private MavenArtifactProvisionOption guavaBundle() { | |
| 57 | - return mavenBundle("com.google.guava", "guava", "16.0.1"); | |
| 58 | - } | |
| 59 | - | |
| 60 | - private CompositeOption nettyBundles() { | |
| 61 | - final String nettyVersion = "4.0.27.Final"; | |
| 62 | - return new CompositeOption() { | |
| 63 | - | |
| 64 | - @Override public Option[] getOptions() { | |
| 65 | - return options( | |
| 66 | - mavenBundle("io.netty", "netty-buffer", nettyVersion), | |
| 67 | - mavenBundle("io.netty", "netty-codec", nettyVersion), | |
| 68 | - mavenBundle("io.netty", "netty-common", nettyVersion), | |
| 69 | - mavenBundle("io.netty", "netty-handler", nettyVersion), | |
| 70 | - mavenBundle("io.netty", "netty-transport", nettyVersion) | |
| 71 | - ); | |
| 72 | - } | |
| 73 | - }; | |
| 74 | - } | |
| 75 | - | |
| 76 | - private CompositeOption defaultOptions() { | |
| 77 | - return new CompositeOption() { | |
| 78 | - | |
| 79 | - @Override public Option[] getOptions() { | |
| 80 | - return options( | |
| 81 | - systemProperty("cassandra.contactpoints").value(CCMBridge.IP_PREFIX + 1), | |
| 82 | - bundle("reference:file:target/classes"), | |
| 83 | - mavenBundle("com.codahale.metrics", "metrics-core", "3.0.2"), | |
| 84 | - mavenBundle("org.slf4j", "slf4j-api", "1.7.5"), | |
| 85 | - mavenBundle("org.slf4j", "slf4j-simple", "1.7.5").noStart(), | |
| 86 | - systemPackages("org.testng", "org.junit", "org.junit.runner", "org.junit.runner.manipulation", | |
| 87 | - "org.junit.runner.notification", "com.jcabi.manifests") | |
| 88 | - ); | |
| 89 | - } | |
| 90 | - }; | |
| 91 | - } | |
| 92 | - | |
| 93 | 43 | @Configuration |
| 94 | 44 | public Option[] shadedConfig() { |
| 95 | 45 | return options( |
| 96 | 46 | driverBundle(true), |
| 47 | + mailboxBundle(), | |
| 97 | 48 | guavaBundle(), |
| 98 | 49 | defaultOptions() |
| 99 | 50 | ); |
| @@ -103,6 +54,7 @@ | ||
| 103 | 54 | public Option[] defaultConfig() { |
| 104 | 55 | return options( |
| 105 | 56 | driverBundle(), |
| 57 | + mailboxBundle(), | |
| 106 | 58 | guavaBundle(), |
| 107 | 59 | nettyBundles(), |
| 108 | 60 | defaultOptions() |
| @@ -113,6 +65,7 @@ | ||
| 113 | 65 | public Option[] guava17Config() { |
| 114 | 66 | return options( |
| 115 | 67 | driverBundle(), |
| 68 | + mailboxBundle(), | |
| 116 | 69 | nettyBundles(), |
| 117 | 70 | guavaBundle().version("17.0"), |
| 118 | 71 | defaultOptions() |
| @@ -123,6 +76,7 @@ | ||
| 123 | 76 | public Option[] guava18Config() { |
| 124 | 77 | return options( |
| 125 | 78 | driverBundle(), |
| 79 | + mailboxBundle(), | |
| 126 | 80 | nettyBundles(), |
| 127 | 81 | guavaBundle().version("18.0"), |
| 128 | 82 | defaultOptions() |
| @@ -139,8 +93,7 @@ | ||
| 139 | 93 | * <ol> |
| 140 | 94 | * <li>Default bundle (Driver with all of it's dependencies)</li> |
| 141 | 95 | * <li>Shaded bundle (Driver with netty shaded)</li> |
| 142 | - * <li>With Guava 15</li> | |
| 143 | - * <li>With Guava 16</li> | |
| 96 | + * <li>With Guava 16.0.1</li> | |
| 144 | 97 | * <li>With Guava 17</li> |
| 145 | 98 | * <li>With Guava 18</li> |
| 146 | 99 | * </ol> |
added driver-examples/osgi/src/test/resources/exam.properties +18 −0
| @@ -0,0 +1,18 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | +# | |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | +# you may not use this file except in compliance with the License. | |
| 6 | +# You may obtain a copy of the License at | |
| 7 | +# | |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | +# | |
| 10 | +# Unless required by applicable law or agreed to in writing, software | |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | +# See the License for the specific language governing permissions and | |
| 14 | +# limitations under the License. | |
| 15 | +# | |
| 16 | + | |
| 17 | +pax.exam.system=test | |
| 18 | +pax.exam.logging=none | |
| No newline at the end of the file |
deleted driver-examples/osgi/src/test/resources/log4j.properties +0 −28
| @@ -1,28 +0,0 @@ | ||
| 1 | -# | |
| 2 | -# Copyright (C) 2012-2015 DataStax Inc. | |
| 3 | -# | |
| 4 | -# Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | -# you may not use this file except in compliance with the License. | |
| 6 | -# You may obtain a copy of the License at | |
| 7 | -# | |
| 8 | -# http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | -# | |
| 10 | -# Unless required by applicable law or agreed to in writing, software | |
| 11 | -# distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | -# See the License for the specific language governing permissions and | |
| 14 | -# limitations under the License. | |
| 15 | -# | |
| 16 | - | |
| 17 | -# Set root logger level to DEBUG and its only appender to A1. | |
| 18 | -log4j.rootLogger=INFO, A1 | |
| 19 | - | |
| 20 | -# Scassandra's info log is a bit verbose | |
| 21 | -log4j.logger.org.scassandra=WARN | |
| 22 | - | |
| 23 | -# A1 is set to be a ConsoleAppender. | |
| 24 | -log4j.appender.A1=org.apache.log4j.ConsoleAppender | |
| 25 | - | |
| 26 | -# A1 uses PatternLayout. | |
| 27 | -log4j.appender.A1.layout=org.apache.log4j.PatternLayout | |
| 28 | -log4j.appender.A1.layout.ConversionPattern=\ %-6r [%t] %-5p %c %x - %m%n |
added driver-examples/osgi/src/test/resources/logback.xml +27 −0
| @@ -0,0 +1,27 @@ | ||
| 1 | +<!-- | |
| 2 | + | |
| 3 | + Copyright (C) 2012-2015 DataStax Inc. | |
| 4 | + | |
| 5 | + Licensed under the Apache License, Version 2.0 (the "License"); | |
| 6 | + you may not use this file except in compliance with the License. | |
| 7 | + You may obtain a copy of the License at | |
| 8 | + | |
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | + | |
| 11 | + Unless required by applicable law or agreed to in writing, software | |
| 12 | + distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | + See the License for the specific language governing permissions and | |
| 15 | + limitations under the License. | |
| 16 | + | |
| 17 | +--> | |
| 18 | +<configuration> | |
| 19 | + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
| 20 | + <layout class="ch.qos.logback.classic.PatternLayout"> | |
| 21 | + <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> | |
| 22 | + </layout> | |
| 23 | + </appender> | |
| 24 | + <root level="INFO"> | |
| 25 | + <appender-ref ref="STDOUT" /> | |
| 26 | + </root> | |
| 27 | +</configuration> | |
| No newline at the end of the file |