Package jetbrains.communicator.util

Examples of jetbrains.communicator.util.WatchDog


    char buf [] = new char[100000];
    Arrays.fill(buf, 'd');
    myIdeFacade.setReturnedFileText(vFile, new String(buf));

    WatchDog s = new WatchDog("get 100000 bytes file");
    mySelf.getVFile(vFile, myIdeFacade);
    s.stop();

    assertEquals("Should successfully return file text", new String(buf), vFile.getContents() );
  }
View Full Code Here


        myDispatcher.sendNow(myUser, new MockMessage(date));
      }
      Thread.sleep(SAVE_WAIT_TIMEOUT*2);


      WatchDog watchDog = new WatchDog("Load history");
      LocalMessageDispatcherImpl localMessageDispatcher = createLocalMessageDispatcher();
      LocalMessage[] messages = localMessageDispatcher.getHistory(myUser, yesterday());
      assertEquals(1000, messages.length);

      long diff = watchDog.diff();
      watchDog.watchAndReset("done");
      assertTrue("Too long getting history:" + diff, diff < 1500);

      messages = localMessageDispatcher.getHistory(myUser, null);
      assertEquals(1000, messages.length);

      diff = watchDog.diff();
      watchDog.watchAndReset("again done");
      assertTrue("Too long getting history second time:" + diff, diff < 100);

    } finally {
      logger.setLevel(oldLevel);
    }
View Full Code Here

TOP

Related Classes of jetbrains.communicator.util.WatchDog

Copyright © 2018 www.massapicom. 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.