Examples of Monkey


Examples of com.jamonapi.MonKey

   * @see com.jamonapi.Monitor#stop
   */
  @Override
  protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable {
    String name = createInvocationTraceName(invocation);
    MonKey key = new MonKeyImp(name, name, "ms.");

    Monitor monitor = MonitorFactory.start(key);
    try {
      return invocation.proceed();
    }
View Full Code Here

Examples of com.netflix.simianarmy.Monkey

    }

    @Test
    public void testRunner() throws InterruptedException {
        BasicScheduler sched = new BasicScheduler(200, TimeUnit.MILLISECONDS, 1);
        Monkey mockMonkey = mock(Monkey.class);
        when(mockMonkey.context()).thenReturn(new TestMonkeyContext(Enums.MONKEY));
        when(mockMonkey.type()).thenReturn(Enums.MONKEY).thenReturn(Enums.MONKEY);

        final AtomicLong counter = new AtomicLong(0L);
        sched.start(mockMonkey, new Runnable() {
            @Override
            public void run() {
View Full Code Here

Examples of com.netflix.simianarmy.Monkey

    @Test
    public void testDelayedStart() throws Exception {
        BasicScheduler sched = new BasicScheduler(1, TimeUnit.HOURS, 1);

        TestMonkeyContext context = new TestMonkeyContext(Enums.MONKEY);
        Monkey mockMonkey = mock(Monkey.class);
        when(mockMonkey.context()).thenReturn(context).thenReturn(context);
        when(mockMonkey.type()).thenReturn(Enums.MONKEY).thenReturn(Enums.MONKEY);

        // first monkey has no previous events, so it runs practically immediately
        FutureTask<Void> task = new FutureTask<Void>(Callables.<Void>returning(null));
        sched.start(mockMonkey, task);
        // make sure that the task gets completed within 100ms
View Full Code Here

Examples of com.netflix.simianarmy.Monkey

    }

    @Test
    void testMonkeyTime() {
        Calendar test = Calendar.getInstance();
        Monkey monkey = new TestMonkey();

        // using leap day b/c it is not a holiday & not a weekend
        test.set(Calendar.YEAR, 2012);
        test.set(Calendar.MONTH, Calendar.FEBRUARY);
        test.set(Calendar.DAY_OF_MONTH, 29);
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Monkey

   * GenericGenerators holder are bound correctly
   */
  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist(monkey);
    s.flush();
    assertNotNull(monkey.getId());
    tx.rollback();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Monkey

   * GenericGenerators holder are bound correctly
   */
  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist(monkey);
    s.flush();
    assertNotNull(monkey.getId());
    tx.rollback();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.annotations.id.entities.Monkey

   * GenericGenerators holder are bound correctly
   */
  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist(monkey);
    s.flush();
    assertNotNull(monkey.getId());
    tx.rollback();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.Monkey

   */

  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist( monkey );
    s.flush();
    assertNotNull( monkey.getId() );
    tx.rollback();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.Monkey

   * GenericGenerators holder are bound correctly
   */
  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist(monkey);
    s.flush();
    assertNotNull(monkey.getId());
    tx.rollback();
    s.close();
  }
View Full Code Here

Examples of org.hibernate.test.annotations.id.sequences.entities.Monkey

   * GenericGenerators holder are bound correctly
   */
  public void testGenericGenerators() throws Exception {
    Session s = openSession();
    Transaction tx = s.beginTransaction();
    Monkey monkey = new Monkey();
    s.persist(monkey);
    s.flush();
    assertNotNull(monkey.getId());
    tx.rollback();
    s.close();
  }
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.