Skip to content

Commit b828240

Browse files
authored
JSDK-109: Improve SSL GCM performance (#591)
* JSDK-109: Improve SSL GCM performance. Updating build to use Java 8 and Gradle 4.6. Also fixed some non-compiling tests. * OTHER: specifying distribution for travis since oraclejdk8 no longer works with default
1 parent fd7f532 commit b828240

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: java
2+
dist: trusty
23
jdk:
34
- oraclejdk8
45
script: ./gradlew -S clean jar ds3-sdk:test

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
allprojects {
1717
group = 'com.spectralogic.ds3'
18-
version = '3.2.8-COMPAT-4'
18+
version = '3.2.8-COMPAT-5'
1919
}
2020

2121
subprojects {
2222
apply plugin: 'maven'
2323
apply plugin: 'java'
2424
apply plugin: 'findbugs'
2525

26-
sourceCompatibility = JavaVersion.VERSION_1_7
26+
sourceCompatibility = JavaVersion.VERSION_1_8
2727
repositories {
2828
mavenCentral()
2929
mavenLocal()
@@ -41,7 +41,7 @@ subprojects {
4141
}
4242

4343
task wrapper(type: Wrapper) {
44-
gradleVersion = '3.1'
44+
gradleVersion = '4.6'
4545
}
4646

4747
project(':ds3-sdk-integration') {

ds3-sdk-integration/src/test/java/com/spectralogic/ds3client/integration/Smoke_Test.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@
5151
import java.nio.channels.SeekableByteChannel;
5252
import java.nio.charset.Charset;
5353
import java.nio.file.*;
54-
import java.util.ArrayList;
55-
import java.util.List;
56-
import java.util.Map;
57-
import java.util.UUID;
54+
import java.util.*;
5855
import java.util.concurrent.CountDownLatch;
5956
import java.util.concurrent.TimeUnit;
6057
import java.util.concurrent.atomic.AtomicBoolean;
@@ -378,6 +375,14 @@ final public SeekableByteChannel buildChannel(final String key) throws IOExcepti
378375
}
379376
}
380377

378+
private Map< String, Set< UUID >> objectsToMap(final Iterable<Contents> objs) {
379+
Map<String, Set<UUID>> objMap = new HashMap<>();
380+
for (Contents next : objs) {
381+
objMap.put(next.getKey(), null);
382+
}
383+
return objMap;
384+
}
385+
381386
@Test
382387
public void multiObjectDeleteNotQuiet() throws IOException, URISyntaxException {
383388
final String bucketName = "multi_object_delete";
@@ -388,7 +393,7 @@ public void multiObjectDeleteNotQuiet() throws IOException, URISyntaxException {
388393

389394
final Iterable<Contents> objs = HELPERS.listObjects(bucketName);
390395
final DeleteObjectsResponse response = client
391-
.deleteObjects(new DeleteObjectsRequest(bucketName, objs).withQuiet(false));
396+
.deleteObjects(new DeleteObjectsRequest(bucketName, objectsToMap(objs)).withQuiet(false));
392397
assertThat(response, is(notNullValue()));
393398
assertThat(response.getDeleteResult(), is(notNullValue()));
394399
assertThat(response.getDeleteResult().getDeletedObjects().size(), is(4));
@@ -410,7 +415,7 @@ public void multiObjectDeleteQuiet() throws IOException, URISyntaxException {
410415

411416
final Iterable<Contents> objs = HELPERS.listObjects(bucketName);
412417
final DeleteObjectsResponse response = client
413-
.deleteObjects(new DeleteObjectsRequest(bucketName, objs).withQuiet(true));
418+
.deleteObjects(new DeleteObjectsRequest(bucketName, objectsToMap(objs)).withQuiet(true));
414419
assertThat(response, is(notNullValue()));
415420
assertThat(response.getDeleteResult(), is(notNullValue()));
416421
assertThat(response.getDeleteResult().getDeletedObjects().size(), is(0));
@@ -429,7 +434,11 @@ public void multiObjectDeleteOfUnknownObjects() throws IOException {
429434
try {
430435
HELPERS.ensureBucketExists(bucketName, envDataPolicyId);
431436

432-
final List<String> objList = Lists.newArrayList("badObj1.txt", "badObj2.txt", "badObj3.txt");
437+
final Map<String, Set<UUID>> objList = new HashMap<>();
438+
objList.put("badObj1.txt", null);
439+
objList.put("badObj2.txt", null);
440+
objList.put("badObj3.txt", null);
441+
433442
final DeleteObjectsResponse response = client
434443
.deleteObjects(new DeleteObjectsRequest(bucketName, objList));
435444
assertThat(response, is(notNullValue()));

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip

0 commit comments

Comments
 (0)