From aa37eaf2813d3961654d16cc2752a686548bb1e1 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Fri, 18 Sep 2015 14:45:38 -0400 Subject: [PATCH] Updates to Feign 8.10.0 and MockWebServer 2.5 --- CHANGELOG.md | 3 +++ cli/build.gradle | 8 ++++---- .../java/denominator/cli/ResourceRecordSetCommands.java | 3 +-- .../denominator/cli/DataFromInstanceMetadataHookTest.java | 4 ++-- clouddns/build.gradle | 6 +++--- .../denominator/clouddns/KeystoneAccessAdapterTest.java | 4 ++-- .../java/denominator/clouddns/MockCloudDNSServer.java | 6 +++--- core/build.gradle | 4 ++-- .../java/denominator/hook/InstanceMetadataHookTest.java | 4 ++-- designate/build.gradle | 6 +++--- .../designate/KeystoneV2AccessAdapterTest.java | 4 ++-- .../java/denominator/designate/MockDesignateServer.java | 6 +++--- dynect/build.gradle | 6 +++--- .../test/java/denominator/dynect/MockDynECTServer.java | 6 +++--- route53/build.gradle | 6 +++--- .../route53/InstanceProfileCredentialsProviderTest.java | 4 ++-- .../test/java/denominator/route53/MockRoute53Server.java | 6 +++--- ultradns/build.gradle | 6 +++--- .../java/denominator/ultradns/MockUltraDNSServer.java | 6 +++--- 19 files changed, 50 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0dcc49b..a8b1abb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Version 4.7 +* Updates to feign 8.10.0 + ### Version 4.7 * CLI supports `HTTP_PROXY` and `HTTPS_PROXY` environment variables diff --git a/cli/build.gradle b/cli/build.gradle index 8994bf8f..b64bc465 100644 --- a/cli/build.gradle +++ b/cli/build.gradle @@ -9,8 +9,8 @@ sourceCompatibility = 1.6 dependencies { compile project(':denominator-core') compile 'io.airlift:airline:0.7' - compile 'org.yaml:snakeyaml:1.15' - compile 'org.bouncycastle:bcpkix-jdk15on:1.50' + compile 'org.yaml:snakeyaml:1.16' + compile 'org.bouncycastle:bcpkix-jdk15on:1.51' // TODO: the following should really only be in the fatJar compile project(':denominator-dynect') compile project(':denominator-ultradns') @@ -20,9 +20,9 @@ dependencies { testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.github.stefanbirkner:system-rules:1.12.0' + testCompile 'com.github.stefanbirkner:system-rules:1.12.1' } // create a self-contained jar that is executable diff --git a/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java b/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java index 6b44379e..fdd1c958 100644 --- a/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java +++ b/cli/src/main/java/denominator/cli/ResourceRecordSetCommands.java @@ -278,8 +278,7 @@ public Iterator doRun(final DNSApiManager mgr) { builder.ttl(ttl); } final ResourceRecordSet> toAdd = builder.build(); - String - cmd = + String cmd = format(";; in zone %s adding to rrset %s %s values: %s", zoneIdOrName, name, type, join(',', toAdd.records())); if (ttl != -1) { diff --git a/cli/src/test/java/denominator/cli/DataFromInstanceMetadataHookTest.java b/cli/src/test/java/denominator/cli/DataFromInstanceMetadataHookTest.java index c43174f5..a54c81d3 100644 --- a/cli/src/test/java/denominator/cli/DataFromInstanceMetadataHookTest.java +++ b/cli/src/test/java/denominator/cli/DataFromInstanceMetadataHookTest.java @@ -1,7 +1,7 @@ package denominator.cli; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.Rule; import org.junit.Test; @@ -18,7 +18,7 @@ public class DataFromInstanceMetadataHookTest { @Rule - public final MockWebServerRule server = new MockWebServerRule(); + public final MockWebServer server = new MockWebServer(); @Rule public final ExpectedException thrown = ExpectedException.none(); diff --git a/clouddns/build.gradle b/clouddns/build.gradle index e8bcdf53..1e2595a0 100644 --- a/clouddns/build.gradle +++ b/clouddns/build.gradle @@ -11,11 +11,11 @@ test { dependencies { compile project(':denominator-core') - compile 'com.netflix.feign:feign-core:8.7.1' - compile 'com.netflix.feign:feign-gson:8.7.1' + compile 'com.netflix.feign:feign-core:8.9.0-SNAPSHOT' + compile 'com.netflix.feign:feign-gson:8.9.0-SNAPSHOT' testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' } diff --git a/clouddns/src/test/java/denominator/clouddns/KeystoneAccessAdapterTest.java b/clouddns/src/test/java/denominator/clouddns/KeystoneAccessAdapterTest.java index 17e46877..11ab0ea5 100644 --- a/clouddns/src/test/java/denominator/clouddns/KeystoneAccessAdapterTest.java +++ b/clouddns/src/test/java/denominator/clouddns/KeystoneAccessAdapterTest.java @@ -3,7 +3,7 @@ import com.google.gson.TypeAdapter; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.Rule; import org.junit.Test; @@ -22,7 +22,7 @@ public class KeystoneAccessAdapterTest { @Rule - public final MockWebServerRule server = new MockWebServerRule(); + public final MockWebServer server = new MockWebServer(); CloudIdentity client = Feign.builder() .decoder( diff --git a/clouddns/src/test/java/denominator/clouddns/MockCloudDNSServer.java b/clouddns/src/test/java/denominator/clouddns/MockCloudDNSServer.java index 083f8a39..4ad2f6bb 100644 --- a/clouddns/src/test/java/denominator/clouddns/MockCloudDNSServer.java +++ b/clouddns/src/test/java/denominator/clouddns/MockCloudDNSServer.java @@ -2,7 +2,7 @@ import com.squareup.okhttp.mockwebserver.MockResponse; import com.squareup.okhttp.mockwebserver.MockWebServer; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -28,7 +28,7 @@ static final class Module { } - private final MockWebServerRule delegate = new MockWebServerRule(); + private final MockWebServer delegate = new MockWebServer(); private final String tokenId = "b84f4a37-5126-4603-9521-ccd0665fbde1"; private String tenantId = "123123"; private String username = "jclouds-joe"; @@ -109,7 +109,7 @@ RecordedRequestAssert assertAuthRequest() throws InterruptedException { } void shutdown() throws IOException { - delegate.get().shutdown(); + delegate.shutdown(); } @Override diff --git a/core/build.gradle b/core/build.gradle index 07bdc182..1a023267 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -17,7 +17,7 @@ dependencies { compile project(':denominator-model') testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' - testCompile 'com.netflix.feign:feign-core:8.7.1' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' + testCompile 'com.netflix.feign:feign-core:8.10.0' testCompile project(':denominator-model').sourceSets.test.output } diff --git a/core/src/test/java/denominator/hook/InstanceMetadataHookTest.java b/core/src/test/java/denominator/hook/InstanceMetadataHookTest.java index 91bed3bf..3640ee89 100644 --- a/core/src/test/java/denominator/hook/InstanceMetadataHookTest.java +++ b/core/src/test/java/denominator/hook/InstanceMetadataHookTest.java @@ -1,7 +1,7 @@ package denominator.hook; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.assertj.core.api.Assertions; import org.junit.Rule; @@ -18,7 +18,7 @@ public class InstanceMetadataHookTest { @Rule - public final MockWebServerRule server = new MockWebServerRule(); + public final MockWebServer server = new MockWebServer(); @Rule public final ExpectedException thrown = ExpectedException.none(); diff --git a/designate/build.gradle b/designate/build.gradle index 3be36123..3a86cf0b 100644 --- a/designate/build.gradle +++ b/designate/build.gradle @@ -12,11 +12,11 @@ test { dependencies { compile project(':denominator-core') - compile 'com.netflix.feign:feign-core:8.7.1' - compile 'com.netflix.feign:feign-gson:8.7.1' + compile 'com.netflix.feign:feign-core:8.9.0-SNAPSHOT' + compile 'com.netflix.feign:feign-gson:8.9.0-SNAPSHOT' testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' } diff --git a/designate/src/test/java/denominator/designate/KeystoneV2AccessAdapterTest.java b/designate/src/test/java/denominator/designate/KeystoneV2AccessAdapterTest.java index 999382f0..0bdf5bce 100644 --- a/designate/src/test/java/denominator/designate/KeystoneV2AccessAdapterTest.java +++ b/designate/src/test/java/denominator/designate/KeystoneV2AccessAdapterTest.java @@ -3,7 +3,7 @@ import com.google.gson.TypeAdapter; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.Rule; import org.junit.Test; @@ -21,7 +21,7 @@ public class KeystoneV2AccessAdapterTest { @Rule - public final MockWebServerRule server = new MockWebServerRule(); + public final MockWebServer server = new MockWebServer(); KeystoneV2 client = Feign.builder() .decoder( diff --git a/designate/src/test/java/denominator/designate/MockDesignateServer.java b/designate/src/test/java/denominator/designate/MockDesignateServer.java index d548f394..72703b67 100644 --- a/designate/src/test/java/denominator/designate/MockDesignateServer.java +++ b/designate/src/test/java/denominator/designate/MockDesignateServer.java @@ -1,7 +1,7 @@ package denominator.designate; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -21,7 +21,7 @@ final class MockDesignateServer extends DesignateProvider implements TestRule { - private final MockWebServerRule delegate = new MockWebServerRule(); + private final MockWebServer delegate = new MockWebServer(); private final String tokenId = "b84f4a37-5126-4603-9521-ccd0665fbde1"; private String tenantId = "123123"; private String username = "joe"; @@ -108,7 +108,7 @@ static final class Module { } void shutdown() throws IOException { - delegate.get().shutdown(); + delegate.shutdown(); } @Override diff --git a/dynect/build.gradle b/dynect/build.gradle index 30b5d374..96323fc4 100644 --- a/dynect/build.gradle +++ b/dynect/build.gradle @@ -12,11 +12,11 @@ test { dependencies { compile project(':denominator-core') - compile 'com.netflix.feign:feign-core:8.7.1' - compile 'com.netflix.feign:feign-gson:8.7.1' + compile 'com.netflix.feign:feign-core:8.10.0' + compile 'com.netflix.feign:feign-gson:8.10.0' testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' } diff --git a/dynect/src/test/java/denominator/dynect/MockDynECTServer.java b/dynect/src/test/java/denominator/dynect/MockDynECTServer.java index b208bb79..e0b6555d 100644 --- a/dynect/src/test/java/denominator/dynect/MockDynECTServer.java +++ b/dynect/src/test/java/denominator/dynect/MockDynECTServer.java @@ -1,7 +1,7 @@ package denominator.dynect; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -21,7 +21,7 @@ final class MockDynECTServer extends DynECTProvider implements TestRule { - private final MockWebServerRule delegate = new MockWebServerRule(); + private final MockWebServer delegate = new MockWebServer(); private final String token = "FFFFFFFFFF"; private String customer = "jclouds"; private String username = "joe"; @@ -93,7 +93,7 @@ RecordedRequestAssert assertSessionRequest() throws InterruptedException { } void shutdown() throws IOException { - delegate.get().shutdown(); + delegate.shutdown(); } @Override diff --git a/route53/build.gradle b/route53/build.gradle index e1c8b911..57c67b59 100644 --- a/route53/build.gradle +++ b/route53/build.gradle @@ -11,11 +11,11 @@ test { dependencies { compile project(':denominator-core') - compile 'com.netflix.feign:feign-core:8.7.1' - compile 'com.netflix.feign:feign-sax:8.7.1' + compile 'com.netflix.feign:feign-core:8.9.0-SNAPSHOT' + compile 'com.netflix.feign:feign-sax:8.9.0-SNAPSHOT' testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' } diff --git a/route53/src/test/java/denominator/route53/InstanceProfileCredentialsProviderTest.java b/route53/src/test/java/denominator/route53/InstanceProfileCredentialsProviderTest.java index 9d5210a2..345aa004 100644 --- a/route53/src/test/java/denominator/route53/InstanceProfileCredentialsProviderTest.java +++ b/route53/src/test/java/denominator/route53/InstanceProfileCredentialsProviderTest.java @@ -1,7 +1,7 @@ package denominator.route53; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.Rule; import org.junit.Test; @@ -18,7 +18,7 @@ public class InstanceProfileCredentialsProviderTest { @Rule - public MockWebServerRule server = new MockWebServerRule(); + public MockWebServer server = new MockWebServer(); @Test public void whenInstanceProfileCredentialsInMetadataServiceReturnMapCredentials() diff --git a/route53/src/test/java/denominator/route53/MockRoute53Server.java b/route53/src/test/java/denominator/route53/MockRoute53Server.java index de7ba6ef..90748cf1 100644 --- a/route53/src/test/java/denominator/route53/MockRoute53Server.java +++ b/route53/src/test/java/denominator/route53/MockRoute53Server.java @@ -1,7 +1,7 @@ package denominator.route53; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -20,7 +20,7 @@ final class MockRoute53Server extends Route53Provider implements TestRule { - private final MockWebServerRule delegate = new MockWebServerRule(); + private final MockWebServer delegate = new MockWebServer(); private String accessKey = "accessKey"; private String secretKey = "secretKey"; private String token = null; @@ -59,7 +59,7 @@ RecordedRequestAssert assertRequest() throws InterruptedException { } void shutdown() throws IOException { - delegate.get().shutdown(); + delegate.shutdown(); } @Override diff --git a/ultradns/build.gradle b/ultradns/build.gradle index 4c149ddc..0919cdaf 100644 --- a/ultradns/build.gradle +++ b/ultradns/build.gradle @@ -11,11 +11,11 @@ test { dependencies { compile project(':denominator-core') - compile 'com.netflix.feign:feign-core:8.7.1' - compile 'com.netflix.feign:feign-sax:8.7.1' + compile 'com.netflix.feign:feign-core:8.9.0-SNAPSHOT' + compile 'com.netflix.feign:feign-sax:8.9.0-SNAPSHOT' testCompile project(':denominator-model').sourceSets.test.output testCompile project(':denominator-core').sourceSets.test.output testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' // last version supporting JDK 7 - testCompile 'com.squareup.okhttp:mockwebserver:2.4.0' + testCompile 'com.squareup.okhttp:mockwebserver:2.5.0' } diff --git a/ultradns/src/test/java/denominator/ultradns/MockUltraDNSServer.java b/ultradns/src/test/java/denominator/ultradns/MockUltraDNSServer.java index 9b981ed5..e1d5a4a2 100644 --- a/ultradns/src/test/java/denominator/ultradns/MockUltraDNSServer.java +++ b/ultradns/src/test/java/denominator/ultradns/MockUltraDNSServer.java @@ -1,7 +1,7 @@ package denominator.ultradns; import com.squareup.okhttp.mockwebserver.MockResponse; -import com.squareup.okhttp.mockwebserver.rule.MockWebServerRule; +import com.squareup.okhttp.mockwebserver.MockWebServer; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -41,7 +41,7 @@ final class MockUltraDNSServer extends UltraDNSProvider implements TestRule { + " \n" + ""; - private final MockWebServerRule delegate = new MockWebServerRule(); + private final MockWebServer delegate = new MockWebServer(); private String username; private String password; private String soapTemplate; @@ -87,7 +87,7 @@ RecordedRequestAssert assertSoapBody(String soapBody) throws InterruptedExceptio } void shutdown() throws IOException { - delegate.get().shutdown(); + delegate.shutdown(); } @Override