6513803: httpserver regression test Test13 failing and causing NullPointerException

Check for NPEs

Reviewed-by: chegar
This commit is contained in:
Michael McMahon 2009-06-29 13:10:33 +01:00
parent 9feab8fb3a
commit a505db1f7d
9 changed files with 44 additions and 22 deletions

View File

@ -86,8 +86,11 @@ public class Test1 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (s1 != null)
s1.stop(2); s1.stop(2);
if (s2 != null)
s2.stop(2); s2.stop(2);
if (executor != null)
executor.shutdown (); executor.shutdown ();
} }
} }

View File

@ -85,8 +85,11 @@ public class Test12 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (s1 != null)
s1.stop(2); s1.stop(2);
if (s2 != null)
s2.stop(2); s2.stop(2);
if (executor != null)
executor.shutdown (); executor.shutdown ();
} }
} }

View File

@ -81,8 +81,11 @@ public class Test13 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (s1 != null)
s1.stop(2); s1.stop(2);
if (s2 != null)
s2.stop(2); s2.stop(2);
if (executor != null)
executor.shutdown (); executor.shutdown ();
} }
} }

View File

@ -62,7 +62,9 @@ public class Test3 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (server != null)
server.stop(2); server.stop(2);
if (exec != null)
exec.shutdown(); exec.shutdown();
} }
} }

View File

@ -60,7 +60,9 @@ public class Test4 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (server != null)
server.stop(2); server.stop(2);
if (exec != null)
exec.shutdown(); exec.shutdown();
} }
} }

View File

@ -61,7 +61,9 @@ public class Test5 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay (); delay ();
if (server != null)
server.stop(2); server.stop(2);
if (exec != null)
exec.shutdown(); exec.shutdown();
} }
} }

View File

@ -97,8 +97,11 @@ public class Test9 extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (s1 != null)
s1.stop(2); s1.stop(2);
if (s2 != null)
s2.stop(2); s2.stop(2);
if (executor != null)
executor.shutdown (); executor.shutdown ();
} }
} }

View File

@ -92,7 +92,9 @@ public class Test9a extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (server != null)
server.stop(2); server.stop(2);
if (executor != null)
executor.shutdown(); executor.shutdown();
} }
} }

View File

@ -89,7 +89,9 @@ public class TestLogging extends Test {
System.out.println ("OK"); System.out.println ("OK");
} finally { } finally {
delay(); delay();
if (s1 != null)
s1.stop(2); s1.stop(2);
if (executor != null)
executor.shutdown(); executor.shutdown();
} }
} }