Elffuss BraidHub

kikocis/java-driver public

JAVA-1233: Update Snappy to 1.1.2.6.

Also adds a test to validate that it can be used in an OSGI environment.
Changeset3421e9a4e25beecfa3810a4e3631accc3287eca63c71549d0c07f12642bf4d46
Authorolim7t <omichallat+github@gmail.com> · 2016-06-29 10:53 -07:00
Committerolim7t <omichallat+github@gmail.com> · 2016-07-14 15:51 -07:00
Parentsb6014e61df4c

Browse the files at this changeset

5 files changed

modified changelog/README.md +1 −0
@@ -5,6 +5,7 @@
55 - [new feature] JAVA-1153: Add PER PARTITION LIMIT to Select QueryBuilder.
66 - [improvement] JAVA-743: Add JSON support to QueryBuilder.
77 - [improvement] JAVA-1233: Update HdrHistogram to 2.1.9.
8+- [improvement] JAVA-1233: Update Snappy to 1.1.2.6.
89
910 Merged from 3.0.x branch:
1011
modified driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +13 −0
@@ -63,6 +63,19 @@
6363 };
6464 }
6565
66+ public static CompositeOption snappyBundle() {
67+ return new CompositeOption() {
68+
69+ @Override
70+ public Option[] getOptions() {
71+ return options(
72+ systemProperty("cassandra.compression").value(ProtocolOptions.Compression.SNAPPY.name()),
73+ mavenBundle("org.xerial.snappy", "snappy-java", "1.1.2.6")
74+ );
75+ }
76+ };
77+ }
78+
6679 public static CompositeOption hdrHistogramBundle() {
6780 return new CompositeOption() {
6881
added driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceSnappyIT.java +58 −0
@@ -0,0 +1,58 @@
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 com.datastax.driver.osgi.api.MailboxException;
19+import org.ops4j.pax.exam.Configuration;
20+import org.ops4j.pax.exam.Option;
21+import org.ops4j.pax.exam.testng.listener.PaxExam;
22+import org.testng.annotations.Listeners;
23+import org.testng.annotations.Test;
24+
25+import static com.datastax.driver.osgi.BundleOptions.*;
26+import static org.ops4j.pax.exam.CoreOptions.options;
27+
28+@Listeners({CCMBridgeListener.class, PaxExam.class})
29+public class MailboxServiceSnappyIT extends MailboxServiceTests {
30+
31+ @Configuration
32+ public Option[] snappyConfig() {
33+ return options(
34+ defaultOptions(),
35+ snappyBundle(),
36+ nettyBundles(),
37+ guavaBundle(),
38+ extrasBundle(),
39+ mappingBundle(),
40+ driverBundle(),
41+ mailboxBundle()
42+ );
43+ }
44+
45+ /**
46+ * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with
47+ * LZ4 compression activated.
48+ *
49+ * @test_category packaging
50+ * @expected_result Can create, retrieve and delete data using the mailbox service.
51+ * @jira_ticket JAVA-1200
52+ * @since 3.1.0
53+ */
54+ @Test(groups = "short")
55+ public void test_snappy() throws MailboxException {
56+ checkService();
57+ }
58+}
modified manual/compression/README.md +1 −1
@@ -68,7 +68,7 @@
6868 <dependency>
6969 <groupId>org.xerial.snappy</groupId>
7070 <artifactId>snappy-java</artifactId>
71- <version>1.0.5</version>
71+ <version>1.1.2.6</version>
7272 </dependency>
7373 ```
7474
modified pom.xml +1 −1
@@ -54,7 +54,7 @@
5454 <guava.version>16.0.1</guava.version>
5555 <netty.version>4.0.37.Final</netty.version>
5656 <metrics.version>3.1.2</metrics.version>
57- <snappy.version>1.0.5</snappy.version>
57+ <snappy.version>1.1.2.6</snappy.version>
5858 <lz4.version>1.3.0</lz4.version>
5959 <hdr.version>2.1.9</hdr.version>
6060 <!-- driver-extras module -->