reduce testAdaptablePoll test time from 9s Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/177e912f Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/177e912f Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/177e912f
Branch: refs/heads/develop Commit: 177e912fad882dde649988c843a37038f8546539 Parents: 1231c6b Author: Dale LaBossiere <dlab...@us.ibm.com> Authored: Fri Oct 27 12:43:01 2017 -0400 Committer: Dale LaBossiere <dlab...@us.ibm.com> Committed: Fri Oct 27 12:43:01 2017 -0400 ---------------------------------------------------------------------- .../apache/edgent/test/topology/TopologyTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/177e912f/api/topology/src/test/java/org/apache/edgent/test/topology/TopologyTest.java ---------------------------------------------------------------------- diff --git a/api/topology/src/test/java/org/apache/edgent/test/topology/TopologyTest.java b/api/topology/src/test/java/org/apache/edgent/test/topology/TopologyTest.java index cc1c059..033baa9 100644 --- a/api/topology/src/test/java/org/apache/edgent/test/topology/TopologyTest.java +++ b/api/topology/src/test/java/org/apache/edgent/test/topology/TopologyTest.java @@ -134,23 +134,23 @@ public abstract class TopologyTest extends TopologyAbstractTest { job = jf.get(); assertEquals(Job.State.RUNNING, job.getCurrentState()); - setPollFrequency(s, 100, TimeUnit.MILLISECONDS); + setPollFrequency(s, 10, TimeUnit.MILLISECONDS); cnt.set(0); - Thread.sleep(TimeUnit.SECONDS.toMillis(3)); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); int curCnt = cnt.get(); - assertTrue("curCnt="+curCnt, curCnt >= 20); + assertTrue("curCnt="+curCnt, curCnt >= 70); - setPollFrequency(s, 1, TimeUnit.SECONDS); + setPollFrequency(s, 100, TimeUnit.MILLISECONDS); cnt.set(0); - Thread.sleep(TimeUnit.SECONDS.toMillis(3)); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); curCnt = cnt.get(); - assertTrue("curCnt="+curCnt, curCnt >= 2 && curCnt <= 4); + assertTrue("curCnt="+curCnt, curCnt >= 5 && curCnt <= 20); - setPollFrequency(s, 100, TimeUnit.MILLISECONDS); + setPollFrequency(s, 10, TimeUnit.MILLISECONDS); cnt.set(0); - Thread.sleep(TimeUnit.SECONDS.toMillis(3)); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); curCnt = cnt.get(); - assertTrue("curCnt="+curCnt, curCnt >= 20); + assertTrue("curCnt="+curCnt, curCnt >= 70); } finally { if (job != null)