Пример #1
0
    def test_enter_exit(self):
        iterations = 3000
        reset_count = 5
        topo = Topology()
        s = topo.source(TimeCounter(iterations=iterations, period=0.01))
        s.set_consistent(ConsistentRegionConfig.periodic(5, drain_timeout=40, reset_timeout=40, max_consecutive_attempts=6))
        
        v = VerifyEnterExit(reset_count + 1, "VerifyEnterExit")
        tester = Tester(topo)
        tester.contents(s, range(0,iterations))
        tester.resets(reset_count)
        tester.add_condition(s, v)

        tester.test(self.test_ctxtype, self.test_config)