Package java.util.concurrent

Examples of java.util.concurrent.CyclicBarrier.reset()


        barrier.reset();
        assertEquals( 2, list.size() );

        timeService.advanceTime(10, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
        assertEquals( 3, list.size() );

        run.set(false);
        barrier.reset();
    }
View Full Code Here


        barrier.await();
        barrier.reset();
        assertEquals( 3, list.size() );

        run.set(false);
        barrier.reset();
    }

    @Test(timeout=10000)
    public void testUnknownProtocol() throws Exception {
        wrongTimerExpression("xyz:30");
View Full Code Here

                                new int[]{1, 1, 1, 1, 1});
                    } catch (Exception e) {
                        e.printStackTrace();
                        // Make other fail,
                        abort.set(true); // if they will soon be waiting,
                        latch.reset(); // and if they are already waiting
                        // Now we can fail!
                        assertNull(e);
                    } finally {
                        lock.unlock();
                    }
View Full Code Here

                        latch.await();
                    } catch (Exception e) {
                        e.printStackTrace();
                        // Make other fail,
                        abort.set(true); // if they will soon be waiting,
                        latch.reset(); // and if they are already waiting
                        // Now we can fail!
                        assertNull(e);
                    }
                }
            }
View Full Code Here

                  }
                }
              }
            } catch (Throwable t) {
              failed.set(true);
              restart.reset();
              throw new RuntimeException(t);
            }
          }
        };
      threads[threadIDX].start();
View Full Code Here

        ksession.fireAllRules();
        assertEquals(0, list.size());

        timeService.advanceTime(35, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
        assertEquals(1, list.size());

        timeService.advanceTime(10, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
View Full Code Here

        barrier.reset();
        assertEquals(1, list.size());

        timeService.advanceTime(10, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
        assertEquals(2, list.size());

        timeService.advanceTime(10, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
View Full Code Here

        barrier.reset();
        assertEquals(2, list.size());

        timeService.advanceTime(10, TimeUnit.SECONDS);
        barrier.await();
        barrier.reset();
        assertEquals( 3, list.size() );
    }

    @Test(timeout=10000)
    public void testExprIntervalTimerRaceCondition() throws Exception {
View Full Code Here

        // Rule still doesn't fire, because the DefaultTimerJob is created now, and now we need to advance the timer again.

        pseudoClock.advanceTime(30000, TimeUnit.MILLISECONDS);
        barrier.await();
        barrier.reset();
        aBool.set(true);

        pseudoClock.advanceTime(10000, TimeUnit.MILLISECONDS);
        barrier.await();
        barrier.reset();
View Full Code Here

        barrier.reset();
        aBool.set(true);

        pseudoClock.advanceTime(10000, TimeUnit.MILLISECONDS);
        barrier.await();
        barrier.reset();
        aBool.set(true);

        String eventTwo = "two";
        ksession.insert(eventTwo);
        ksession.fireAllRules();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.