diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/command/ExecutionTypeTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/command/ExecutionTypeTest.java index fb9e5e0bf..6bd7bfc25 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/command/ExecutionTypeTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/command/ExecutionTypeTest.java @@ -7,7 +7,6 @@ import rx.internal.operators.OperatorMulticast; import java.util.List; -import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.concurrent.RunnableFuture; @@ -30,7 +29,6 @@ public static List data() { {returnType(Future.class), shouldHaveExecutionType(ASYNCHRONOUS)}, {returnType(AsyncResult.class), shouldHaveExecutionType(ASYNCHRONOUS)}, {returnType(RunnableFuture.class), shouldHaveExecutionType(ASYNCHRONOUS)}, - {returnType(CompletableFuture.class), shouldHaveExecutionType(ASYNCHRONOUS)}, {returnType(Observable.class), shouldHaveExecutionType(OBSERVABLE)}, {returnType(OperatorMulticast.class), shouldHaveExecutionType(OBSERVABLE)}, }); diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/cache/CacheTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/cache/CacheTest.java index 5bc31b45b..ea78d82bd 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/cache/CacheTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/cache/CacheTest.java @@ -1,7 +1,7 @@ package com.netflix.hystrix.contrib.javanica.test.spring.cache; import com.google.common.collect.Iterables; -import com.netflix.hystrix.HystrixExecutableInfo; +import com.netflix.hystrix.HystrixInvokableInfo; import com.netflix.hystrix.HystrixRequestLog; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import com.netflix.hystrix.contrib.javanica.test.spring.conf.AopCglibConfig; @@ -38,7 +38,7 @@ public void testGetUserCache() { try { User user = userService.getUser("1", "name"); - HystrixExecutableInfo getUserByIdCommand = getLastExecutedCommand(); + HystrixInvokableInfo getUserByIdCommand = getLastExecutedCommand(); assertEquals("1", user.getId()); // this is the first time we've executed this command with @@ -59,7 +59,7 @@ public void testGetUserCache() { context = HystrixRequestContext.initializeContext(); try { User user = userService.getUser("1", "name"); - HystrixExecutableInfo getUserByIdCommand = getLastExecutedCommand(); + HystrixInvokableInfo getUserByIdCommand = getLastExecutedCommand(); assertEquals("1", user.getId()); // this is a new request context so this // should not come from cache @@ -69,8 +69,8 @@ public void testGetUserCache() { } } - private HystrixExecutableInfo getLastExecutedCommand() { - Collection> executedCommands = + private HystrixInvokableInfo getLastExecutedCommand() { + Collection> executedCommands = HystrixRequestLog.getCurrentRequest().getAllExecutedCommands(); return Iterables.getLast(executedCommands); } diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/collapser/CollapserTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/collapser/CollapserTest.java index 79ce1d281..497f6848b 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/collapser/CollapserTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/collapser/CollapserTest.java @@ -1,6 +1,7 @@ package com.netflix.hystrix.contrib.javanica.test.spring.collapser; import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.HystrixInvokableInfo; import com.netflix.hystrix.HystrixRequestLog; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCollapser; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; @@ -53,7 +54,7 @@ public void testCollapserAsync() throws ExecutionException, InterruptedException // assert that the batch command 'GetUserCommand' was in fact // executed and that it executed only once assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); // assert the command is the one we're expecting assertEquals("GetUserCommand", command.getCommandKey().name()); @@ -169,7 +170,7 @@ public void testCollapserSync() throws ExecutionException, InterruptedException assertEquals("name: 3", u3.getName()); assertEquals("name: 4", u4.getName()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("GetUserCommand", command.getCommandKey().name()); // confirm that it was a COLLAPSED command execution @@ -187,7 +188,7 @@ public void testCollapserSyncWithFallbackCommand() throws ExecutionException, In try { User u1 = userService.getUserSync("5", "name: "); assertEquals("name: 5", u1.getName()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("GetUserCommand", command.getCommandKey().name()); // confirm that it was a COLLAPSED command execution diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/collapser/CollapserPropertiesTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/collapser/CollapserPropertiesTest.java index e4ea2b96a..0d2f9613c 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/collapser/CollapserPropertiesTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/collapser/CollapserPropertiesTest.java @@ -1,6 +1,7 @@ package com.netflix.hystrix.contrib.javanica.test.spring.configuration.collapser; import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.HystrixInvokableInfo; import com.netflix.hystrix.HystrixRequestLog; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCollapser; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; @@ -44,7 +45,7 @@ public void testCollapser() throws ExecutionException, InterruptedException { assertEquals("name: 3", u3.getName()); assertEquals("name: 4", u4.getName()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("getUser", command.getCommandKey().name()); //When a command is fronted by an HystrixCollapser then this marks how many requests are collapsed into the single command execution. diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/command/CommandPropertiesTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/command/CommandPropertiesTest.java index 11ab9dcd3..d0cf3e438 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/command/CommandPropertiesTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/configuration/command/CommandPropertiesTest.java @@ -1,6 +1,7 @@ package com.netflix.hystrix.contrib.javanica.test.spring.configuration.command; import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.HystrixInvokableInfo; import com.netflix.hystrix.HystrixRequestLog; import com.netflix.hystrix.HystrixThreadPool; import com.netflix.hystrix.HystrixThreadPoolProperties; @@ -38,7 +39,7 @@ public void testGetUser() throws NoSuchFieldException, IllegalAccessException { User u1 = userService.getUser("1", "name: "); assertEquals("name: 1", u1.getName()); assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("GetUserCommand", command.getCommandKey().name()); assertEquals("UserGroupKey", command.getCommandGroup().name()); @@ -74,7 +75,7 @@ public void testGetUserDefaultPropertiesValues() { User u1 = userService.getUserDefProperties("1", "name: "); assertEquals("name: 1", u1.getName()); assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("getUserDefProperties", command.getCommandKey().name()); assertEquals("UserService", command.getCommandGroup().name()); diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/fallback/CommandFallbackTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/fallback/CommandFallbackTest.java index cb049be9d..cbf21509e 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/fallback/CommandFallbackTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/fallback/CommandFallbackTest.java @@ -1,6 +1,7 @@ package com.netflix.hystrix.contrib.javanica.test.spring.fallback; import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.HystrixInvokableInfo; import com.netflix.hystrix.HystrixRequestLog; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import com.netflix.hystrix.contrib.javanica.command.AsyncResult; @@ -43,7 +44,7 @@ public void testGetUserAsyncWithFallback() throws ExecutionException, Interrupte assertEquals("def", f1.get().getName()); assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("getUserAsync", command.getCommandKey().name()); @@ -64,7 +65,7 @@ public void testGetUserSyncWithFallback() { assertEquals("def", u1.getName()); assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo command = HystrixRequestLog.getCurrentRequest() + HystrixInvokableInfo command = HystrixRequestLog.getCurrentRequest() .getAllExecutedCommands().iterator().next(); assertEquals("getUserSync", command.getCommandKey().name()); @@ -94,7 +95,7 @@ public void testGetUserAsyncWithFallbackCommand() throws ExecutionException, Int assertEquals("def", f1.get().getName()); assertEquals(3, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo getUserAsyncFallbackCommand = getHystrixCommandByKey( + HystrixInvokableInfo getUserAsyncFallbackCommand = getHystrixCommandByKey( "getUserAsyncFallbackCommand"); com.netflix.hystrix.HystrixCommand firstFallbackCommand = getHystrixCommandByKey("firstFallbackCommand"); com.netflix.hystrix.HystrixCommand secondFallbackCommand = getHystrixCommandByKey("secondFallbackCommand"); @@ -119,7 +120,7 @@ public void testGetUserSyncWithFallbackCommand() { assertEquals("def", u1.getName()); assertEquals(3, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); - com.netflix.hystrix.HystrixExecutableInfo getUserSyncFallbackCommand = getHystrixCommandByKey( + HystrixInvokableInfo getUserSyncFallbackCommand = getHystrixCommandByKey( "getUserSyncFallbackCommand"); com.netflix.hystrix.HystrixCommand firstFallbackCommand = getHystrixCommandByKey("firstFallbackCommand"); com.netflix.hystrix.HystrixCommand secondFallbackCommand = getHystrixCommandByKey("secondFallbackCommand"); diff --git a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/observable/ObservableTest.java b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/observable/ObservableTest.java index 9e7e47d98..62f9a4dce 100644 --- a/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/observable/ObservableTest.java +++ b/hystrix-contrib/hystrix-javanica/src/test/java/com/netflix/hystrix/contrib/javanica/test/spring/observable/ObservableTest.java @@ -41,7 +41,7 @@ public void testGetUserByIdObservable() { try { // blocking - assertEquals("name: 1", userService.getUser("1", "name: ").toBlockingObservable().single().getName()); + assertEquals("name: 1", userService.getUser("1", "name: ").toBlocking().single().getName()); // non-blocking // - this is a verbose anonymous inner-class approach and doesn't do assertions @@ -88,7 +88,7 @@ public void testGetUserWithFallback() { final User exUser = new User("def", "def"); // blocking - assertEquals(exUser, userService.getUser(" ", "").toBlockingObservable().single()); + assertEquals(exUser, userService.getUser(" ", "").toBlocking().single()); assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size()); com.netflix.hystrix.HystrixCommand getUserCommand = getHystrixCommandByKey("getUser"); // confirm that command has failed diff --git a/settings.gradle b/settings.gradle index 00604178d..6f1d54bd4 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,5 +10,5 @@ include 'hystrix-core', \ 'hystrix-contrib:hystrix-codahale-metrics-publisher', \ 'hystrix-contrib:hystrix-yammer-metrics-publisher', \ 'hystrix-contrib:hystrix-network-auditor-agent', \ -'hystrix-contrib:hystrix-javanica', \ +//'hystrix-contrib:hystrix-javanica', \ 'hystrix-dashboard'