Skip to content

Commit

Permalink
Revert "Fix assertions which are no longer true after this commit"
Browse files Browse the repository at this point in the history
This reverts commit bde8615.
  • Loading branch information
Matt Jacobs committed Aug 3, 2016
1 parent bde8615 commit 51531d2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions hystrix-core/src/test/java/com/netflix/hystrix/HystrixTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

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

@Override
public void onError(Throwable e) {
System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " OnError : " + e);
e.printStackTrace();
fail(e.getMessage());
latch.countDown();
}

@Override
public void onNext(Boolean value) {
System.out.println(System.currentTimeMillis() + " : " + Thread.currentThread().getName() + " OnNext : " + value);
System.out.println("OnNext : " + value);
assertTrue(value);
assertEquals("CommandName", Hystrix.getCurrentThreadExecutingCommand().name());
assertEquals(1, Hystrix.getCommandCount());
}
});

try {
assertNull(Hystrix.getCurrentThreadExecutingCommand());
assertEquals(0, Hystrix.getCommandCount());
assertTrue(latch.await(1000, TimeUnit.MILLISECONDS));
latch.await();
} catch (InterruptedException ex) {
fail(ex.getMessage());
}
Expand Down

0 comments on commit 51531d2

Please sign in to comment.