def test_abort_and_reset(self):
        results1 = []
        results2 = []
        results3 = []
        barrier2 = self.barriertype(self.N)
        def f():
            try:
                i = self.barrier.wait()
                if i == self.N//2:
                    raise RuntimeError
                self.barrier.wait()
                results1.append(True)
            except threading.BrokenBarrierError:
                results2.append(True)
            except RuntimeError:
                self.barrier.abort()
                pass
            # Synchronize and reset the barrier.  Must synchronize first so
            # that everyone has left it when we reset, and after so that no
            # one enters it before the reset.
            if barrier2.wait() == self.N//2:
                self.barrier.reset()
            barrier2.wait()
            self.barrier.wait()
            results3.append(True)

        self.run_threads(f)
        self.assertEqual(len(results1), 0)
        self.assertEqual(len(results2), self.N-1)
        self.assertEqual(len(results3), self.N)
Sets value associated to key. Key is expected to be shorter than 200
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/lock_tests.py/BarrierTests.test_abort_and_reset--crossover with--dataset/ETHPy150Open mariocesar/sorl-thumbnail/sorl/thumbnail/kvstores/base.py/KVStoreBase._set_raw