Committed by
Gerrit Code Review
Remove unnecessary delay in CounterTest.
Change-Id: I5a29c88f803c2d01f9b4f502b64ad4d1460b977b
Showing
1 changed file
with
2 additions
and
4 deletions
| ... | @@ -45,10 +45,8 @@ public class CounterTest { | ... | @@ -45,10 +45,8 @@ public class CounterTest { |
| 45 | 45 | ||
| 46 | @Test | 46 | @Test |
| 47 | public void freeze() { | 47 | public void freeze() { |
| 48 | - Counter tt = new Counter(); | 48 | + long now = System.currentTimeMillis(); |
| 49 | - tt.add(123L); | 49 | + Counter tt = new Counter(now, 123L, now + 1000); |
| 50 | - assertEquals("incorrect number of bytes", 123L, tt.total()); | ||
| 51 | - delay(1000); | ||
| 52 | tt.freeze(); | 50 | tt.freeze(); |
| 53 | tt.add(123L); | 51 | tt.add(123L); |
| 54 | assertEquals("incorrect number of bytes", 123L, tt.total()); | 52 | assertEquals("incorrect number of bytes", 123L, tt.total()); | ... | ... |
-
Please register or login to post a comment