public void waitToStart() throws InterruptedException {
   start();
   synchronized (lock) {
     while (state == STATE_INITIAL) {
       lock.wait();
     }
   }
 }
Example #2
0
 @Test
 public void testAnonymousDisallowed() throws Exception {
   setAuthenticationHandlerConfig(getAuthenticationHandlerConfiguration(false));
   start();
   try {
     URL url = new URL(getBaseURL());
     HttpURLConnection conn = (HttpURLConnection) url.openConnection();
     conn.connect();
     assertEquals(HttpURLConnection.HTTP_UNAUTHORIZED, conn.getResponseCode());
   } finally {
     stop();
   }
 }
 @Before
 public void setUp() {
   start(fakeApplication(inMemoryDatabase(), fakeGlobal()));
   Ebean.save((List) Yaml.load("test-data.yml"));
 }
 @Before
 public void setUp() {
   start(fakeApplication(Helpers.inMemoryDatabase()));
 }