Skip to content

Commit dec6d5f

Browse files
committed
Minor changes after review
1 parent 36c62e8 commit dec6d5f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

hystrix/src/test/java/com/baeldung/hystrix/HystrixTimeoutTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@
55
import com.netflix.hystrix.HystrixCommandProperties;
66
import com.netflix.hystrix.HystrixThreadPoolProperties;
77
import com.netflix.hystrix.exception.HystrixRuntimeException;
8-
import org.junit.*;
9-
import org.junit.rules.ExpectedException;
10-
import org.junit.runners.MethodSorters;
8+
import org.junit.Test;
119

1210
import static org.hamcrest.MatcherAssert.assertThat;
1311
import static org.hamcrest.Matchers.equalTo;
1412

1513
public class HystrixTimeoutTest {
1614

1715
@Test
18-
public void givenInputBobAndDefaultSettings_whenExecuted_thenReturnHelloBob(){
16+
public void givenInputBobAndDefaultSettings_whenCommandExecuted_thenReturnHelloBob(){
1917
assertThat(new CommandHelloWorld("Bob").execute(), equalTo("Hello Bob!"));
2018
}
2119

2220
@Test
23-
public void givenSvcTimeoutOf100AndDefaultSettings_whenExecuted_thenReturnSuccess()
21+
public void givenSvcTimeoutOf100AndDefaultSettings_whenRemoteSvcExecuted_thenReturnSuccess()
2422
throws InterruptedException {
2523
HystrixCommand.Setter config = HystrixCommand
2624
.Setter
@@ -31,15 +29,15 @@ public void givenSvcTimeoutOf100AndDefaultSettings_whenExecuted_thenReturnSucces
3129
}
3230

3331
@Test(expected = HystrixRuntimeException.class)
34-
public void givenSvcTimeoutOf10000AndDefaultSettings__whenExecuted_thenExpectHRE() throws InterruptedException {
32+
public void givenSvcTimeoutOf10000AndDefaultSettings__whenRemoteSvcExecuted_thenExpectHRE() throws InterruptedException {
3533
HystrixCommand.Setter config = HystrixCommand
3634
.Setter
3735
.withGroupKey(HystrixCommandGroupKey.Factory.asKey("RemoteServiceGroupTest3"));
3836
new RemoteServiceTestCommand(config, new RemoteServiceTestSimulator(10_000)).execute();
3937
}
4038

4139
@Test
42-
public void givenSvcTimeoutOf5000AndExecTimeoutOf10000__whenExecuted_thenReturnSuccess()
40+
public void givenSvcTimeoutOf5000AndExecTimeoutOf10000_whenRemoteSvcExecuted_thenReturnSuccess()
4341
throws InterruptedException {
4442

4543
HystrixCommand.Setter config = HystrixCommand

0 commit comments

Comments
 (0)