Skip to content

Commit

Permalink
JSDK-109: Improve SSL GCM performance (#591)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
RachelTucker authored Jul 14, 2021
1 parent fd7f532 commit b828240
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: java
dist: trusty
jdk:
- oraclejdk8
script: ./gradlew -S clean jar ds3-sdk:test
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

allprojects {
group = 'com.spectralogic.ds3'
version = '3.2.8-COMPAT-4'
version = '3.2.8-COMPAT-5'
}

subprojects {
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'findbugs'

sourceCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
mavenLocal()
Expand All @@ -41,7 +41,7 @@ subprojects {
}

task wrapper(type: Wrapper) {
gradleVersion = '3.1'
gradleVersion = '4.6'
}

project(':ds3-sdk-integration') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
import java.nio.channels.SeekableByteChannel;
import java.nio.charset.Charset;
import java.nio.file.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -378,6 +375,14 @@ final public SeekableByteChannel buildChannel(final String key) throws IOExcepti
}
}

private Map< String, Set< UUID >> objectsToMap(final Iterable<Contents> objs) {
Map<String, Set<UUID>> objMap = new HashMap<>();
for (Contents next : objs) {
objMap.put(next.getKey(), null);
}
return objMap;
}

@Test
public void multiObjectDeleteNotQuiet() throws IOException, URISyntaxException {
final String bucketName = "multi_object_delete";
Expand All @@ -388,7 +393,7 @@ public void multiObjectDeleteNotQuiet() throws IOException, URISyntaxException {

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

final Iterable<Contents> objs = HELPERS.listObjects(bucketName);
final DeleteObjectsResponse response = client
.deleteObjects(new DeleteObjectsRequest(bucketName, objs).withQuiet(true));
.deleteObjects(new DeleteObjectsRequest(bucketName, objectsToMap(objs)).withQuiet(true));
assertThat(response, is(notNullValue()));
assertThat(response.getDeleteResult(), is(notNullValue()));
assertThat(response.getDeleteResult().getDeletedObjects().size(), is(0));
Expand All @@ -429,7 +434,11 @@ public void multiObjectDeleteOfUnknownObjects() throws IOException {
try {
HELPERS.ensureBucketExists(bucketName, envDataPolicyId);

final List<String> objList = Lists.newArrayList("badObj1.txt", "badObj2.txt", "badObj3.txt");
final Map<String, Set<UUID>> objList = new HashMap<>();
objList.put("badObj1.txt", null);
objList.put("badObj2.txt", null);
objList.put("badObj3.txt", null);

final DeleteObjectsResponse response = client
.deleteObjects(new DeleteObjectsRequest(bucketName, objList));
assertThat(response, is(notNullValue()));
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip

0 comments on commit b828240

Please sign in to comment.