--- jsr166/src/test/tck/SubmissionPublisherTest.java 2017/03/09 00:11:16 1.19 +++ jsr166/src/test/tck/SubmissionPublisherTest.java 2017/11/04 12:49:58 1.22 @@ -169,7 +169,8 @@ public class SubmissionPublisherTest ext } /** - * A null Executor argument to SubmissionPublisher constructor throws NPE + * A null Executor argument to SubmissionPublisher constructor + * throws NullPointerException */ public void testConstructor3() { try { @@ -180,7 +181,7 @@ public class SubmissionPublisherTest ext /** * A negative capacity argument to SubmissionPublisher constructor - * throws IAE + * throws IllegalArgumentException */ public void testConstructor4() { Executor e = Executors.newFixedThreadPool(1); @@ -192,8 +193,9 @@ public class SubmissionPublisherTest ext /** * A closed publisher reports isClosed with no closedException and - * throws ISE upon attempted submission; a subsequent close or - * closeExceptionally has no additional effect. + * throws IllegalStateException upon attempted submission; a + * subsequent close or closeExceptionally has no additional + * effect. */ public void testClose() { SubmissionPublisher p = basicPublisher(); @@ -213,9 +215,9 @@ public class SubmissionPublisherTest ext /** * A publisher closedExceptionally reports isClosed with the - * closedException and throws ISE upon attempted submission; a - * subsequent close or closeExceptionally has no additional - * effect. + * closedException and throws IllegalStateException upon attempted + * submission; a subsequent close or closeExceptionally has no + * additional effect. */ public void testCloseExceptionally() { SubmissionPublisher p = basicPublisher(); @@ -492,7 +494,7 @@ public class SubmissionPublisherTest ext s1.request = false; p.subscribe(s1); s1.awaitSubscribe(); - assertTrue(p.estimateMinimumDemand() == 0); + assertEquals(0, p.estimateMinimumDemand()); TestSubscriber s2 = new TestSubscriber(); p.subscribe(s2); p.submit(1); @@ -564,7 +566,7 @@ public class SubmissionPublisherTest ext /** * estimateMinimumDemand reports 0 until request, nonzero after - * request, and zero again after delivery + * request */ public void testEstimateMinimumDemand() { TestSubscriber s = new TestSubscriber(); @@ -575,9 +577,6 @@ public class SubmissionPublisherTest ext assertEquals(0, p.estimateMinimumDemand()); s.sn.request(1); assertEquals(1, p.estimateMinimumDemand()); - p.submit(1); - s.awaitNext(1); - assertEquals(0, p.estimateMinimumDemand()); } /**