From fb3ea1feb0951c0f18a9227826ce99327a443f17 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 14 Jan 2014 20:38:03 +0100 Subject: [PATCH] Use assertThat instead of plain asserts in MemoryCircuitBreakerTests --- .../common/breaker/MemoryCircuitBreakerTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java b/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java index 7a07d0b03b6..5565cd44c0d 100644 --- a/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java +++ b/src/test/java/org/elasticsearch/common/breaker/MemoryCircuitBreakerTests.java @@ -54,7 +54,7 @@ public class MemoryCircuitBreakerTests extends ElasticsearchTestCase { if (tripped.get()) { assertThat("tripped too many times", true, equalTo(false)); } else { - assert tripped.compareAndSet(false, true); + assertThat(tripped.compareAndSet(false, true), equalTo(true)); } } catch (Throwable e2) { lastException.set(e2); @@ -86,7 +86,6 @@ public class MemoryCircuitBreakerTests extends ElasticsearchTestCase { breaker.addEstimateBytesAndMaybeBreak(3); fail("should never reach this"); } catch (CircuitBreakingException cbe) { - assert true; } // shouldn't throw an exception @@ -102,7 +101,6 @@ public class MemoryCircuitBreakerTests extends ElasticsearchTestCase { breaker.addEstimateBytesAndMaybeBreak(0); fail("should never reach this"); } catch (CircuitBreakingException cbe) { - assert true; } } }