提交 b9bfd389 编写于 作者: M michaelm

6513803: httpserver regression test Test13 failing and causing NullPointerException

Summary: check for NPEs
Reviewed-by: chegar
上级 b2bc82b6
...@@ -86,8 +86,11 @@ public class Test1 extends Test { ...@@ -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 ();
} }
} }
......
...@@ -85,8 +85,11 @@ public class Test12 extends Test { ...@@ -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 ();
} }
} }
......
...@@ -81,8 +81,11 @@ public class Test13 extends Test { ...@@ -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 ();
} }
} }
......
...@@ -62,7 +62,9 @@ public class Test3 extends Test { ...@@ -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();
} }
} }
......
...@@ -60,7 +60,9 @@ public class Test4 extends Test { ...@@ -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();
} }
} }
......
...@@ -61,7 +61,9 @@ public class Test5 extends Test { ...@@ -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();
} }
} }
......
...@@ -97,8 +97,11 @@ public class Test9 extends Test { ...@@ -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 ();
} }
} }
......
...@@ -92,8 +92,10 @@ public class Test9a extends Test { ...@@ -92,8 +92,10 @@ 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);
executor.shutdown (); if (executor != null)
executor.shutdown();
} }
} }
......
...@@ -89,8 +89,10 @@ public class TestLogging extends Test { ...@@ -89,8 +89,10 @@ 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);
executor.shutdown (); if (executor != null)
executor.shutdown();
} }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册