Commits

Anders Lehmann  committed 0b3a630

Cleaned up test a bit

  • Participants
  • Parent commits f4ff10d

Comments (0)

Files changed (1)

File src/Test/LogServerTest.java

 
 
 public class LogServerTest {
-	private int PORT = 6934;
-
+	private static int PORT = 6934;
+	private static LogServer serv;
+	
 	@BeforeClass
 	public static void setUpBeforeClass() throws Exception {
+		serv = new LogServer(PORT);
+		new Thread(serv).start();
 	}
 
 	@AfterClass
 	public static void tearDownAfterClass() throws Exception {
+		while (serv.running){
+			serv.running = false;
+		}
+		serv = null;
 	}
 
 	@Test
 	public void testServerAlloc() {
-		LogServer serv = new LogServer(PORT);
-		new Thread(serv).start();
 		assertTrue(serv.running);
+		
+	}
+	
+	public void testServerRecv(){
+		
 	}
 
+	public void testServerStop(){
+		serv.running = false;
+		assertFalse(serv.running);
+	}
 }