Skip to content

Commit 51531d2

Browse files
author
Matt Jacobs
committed
Revert "Fix assertions which are no longer true after this commit"
This reverts commit bde8615.
1 parent bde8615 commit 51531d2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hystrix-core/src/test/java/com/netflix/hystrix/HystrixTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.ArrayList;
2828
import java.util.List;
2929
import java.util.concurrent.CountDownLatch;
30-
import java.util.concurrent.TimeUnit;
3130
import java.util.concurrent.atomic.AtomicBoolean;
3231

3332
import static org.junit.Assert.*;
@@ -95,29 +94,28 @@ protected Boolean run() {
9594
command.observe().subscribe(new Subscriber<Boolean>() {
9695
@Override
9796
public void onCompleted() {
98-
System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " OnCompleted");
9997
latch.countDown();
10098
}
10199

102100
@Override
103101
public void onError(Throwable e) {
104-
System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " OnError : " + e);
105-
e.printStackTrace();
106102
fail(e.getMessage());
107103
latch.countDown();
108104
}
109105

110106
@Override
111107
public void onNext(Boolean value) {
112-
System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " OnNext : " + value);
108+
System.out.println("OnNext : " + value);
113109
assertTrue(value);
110+
assertEquals("CommandName", Hystrix.getCurrentThreadExecutingCommand().name());
111+
assertEquals(1, Hystrix.getCommandCount());
114112
}
115113
});
116114

117115
try {
118116
assertNull(Hystrix.getCurrentThreadExecutingCommand());
119117
assertEquals(0, Hystrix.getCommandCount());
120-
assertTrue(latch.await(1000, TimeUnit.MILLISECONDS));
118+
latch.await();
121119
} catch (InterruptedException ex) {
122120
fail(ex.getMessage());
123121
}

0 commit comments

Comments
 (0)