You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/09/05 15:38:26 UTC

[tomcat] branch 8.5.x updated: Fix NPEs in tests. Align with 9.0.x.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new b297676  Fix NPEs in tests. Align with 9.0.x.
b297676 is described below

commit b297676fcd34dcf494a7d2a1de12f88a0cc9bc48
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Sep 5 16:38:06 2019 +0100

    Fix NPEs in tests. Align with 9.0.x.
---
 test/org/apache/coyote/http2/TestAbstractStream.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestAbstractStream.java b/test/org/apache/coyote/http2/TestAbstractStream.java
index 30b9258..9a44868 100644
--- a/test/org/apache/coyote/http2/TestAbstractStream.java
+++ b/test/org/apache/coyote/http2/TestAbstractStream.java
@@ -28,7 +28,7 @@ public class TestAbstractStream {
     @Test
     public void testDependenciesFig3() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -59,7 +59,7 @@ public class TestAbstractStream {
     @Test
     public void testDependenciesFig4() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -90,7 +90,7 @@ public class TestAbstractStream {
     @Test
     public void testDependenciesFig5NonExclusive() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -132,7 +132,7 @@ public class TestAbstractStream {
     @Test
     public void testDependenciesFig5Exclusive() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -174,7 +174,7 @@ public class TestAbstractStream {
     @Test
     public void testCircular01() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -204,7 +204,7 @@ public class TestAbstractStream {
     @Test
     public void testCircular02() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(2), handler);
         Stream c = new Stream(Integer.valueOf(3), handler);
@@ -250,7 +250,7 @@ public class TestAbstractStream {
     @Test
     public void testCircular03() {
         // Setup
-        Http2UpgradeHandler handler = new Http2UpgradeHandler(null, null, null);
+        Http2UpgradeHandler handler = new Http2UpgradeHandler(new Http2Protocol(), null, null);
         Stream a = new Stream(Integer.valueOf(1), handler);
         Stream b = new Stream(Integer.valueOf(3), handler);
         Stream c = new Stream(Integer.valueOf(5), handler);
@@ -270,7 +270,7 @@ public class TestAbstractStream {
         Assert.assertEquals(b, d.getParentStream());
 
         // This triggers the StackOverflowError
-        c.isDescendant(d);
+        Assert.assertTrue(c.isDescendant(d));
 
         // Check children
         Assert.assertEquals(1,  handler.getChildStreams().size());


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org