STORM-1255: combine two tests to make things clearer
Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/3fe11ecc Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/3fe11ecc Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/3fe11ecc Branch: refs/heads/master Commit: 3fe11ecc652790684010b5fdd36c53844e89ce42 Parents: 20851f8 Author: Alessandro Bellina <[email protected]> Authored: Wed Feb 17 12:31:58 2016 -0600 Committer: Alessandro Bellina <[email protected]> Committed: Wed Feb 17 12:31:58 2016 -0600 ---------------------------------------------------------------------- storm-core/test/jvm/org/apache/storm/utils/TimeTest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/3fe11ecc/storm-core/test/jvm/org/apache/storm/utils/TimeTest.java ---------------------------------------------------------------------- diff --git a/storm-core/test/jvm/org/apache/storm/utils/TimeTest.java b/storm-core/test/jvm/org/apache/storm/utils/TimeTest.java index eb5e1d5..13b4914 100644 --- a/storm-core/test/jvm/org/apache/storm/utils/TimeTest.java +++ b/storm-core/test/jvm/org/apache/storm/utils/TimeTest.java @@ -33,18 +33,14 @@ public class TimeTest { Assert.assertEquals(Time.secsToMillisLong(10.1), 10100); } - @Test - public void ifNotSimulatingIsSimulatingReturnsFalse() { - Assert.assertFalse(Time.isSimulating()); - } - @Test(expected=IllegalStateException.class) public void ifNotSimulatingAdvanceTimeThrows() { Time.advanceTime(1000); } @Test - public void ifSimulatingIsSimulatingReturnsTrue() { + public void isSimulatingReturnsTrueDuringSimulationTest() { + Assert.assertFalse(Time.isSimulating()); Time.startSimulating(); Assert.assertTrue(Time.isSimulating()); Time.stopSimulating();
