@@ -0,0 +1,2254 @@
+/*%0A# Licensed Materials - Property of IBM%0A# Copyright IBM Corp. 2020%0A */%0Apackage com.ibm.streamsx.topology.test.spl;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.junit.Assume.assumeTrue;%0A%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.concurrent.TimeUnit;%0Aimport java.util.Arrays;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport com.ibm.streams.flow.handlers.StreamCollector;%0Aimport com.ibm.streams.flow.handlers.StreamCounter;%0Aimport com.ibm.streams.operator.StreamSchema;%0Aimport com.ibm.streams.operator.Tuple;%0Aimport com.ibm.streamsx.topology.TStream;%0Aimport com.ibm.streamsx.topology.TStream.Routing;%0Aimport com.ibm.streamsx.topology.Topology;%0Aimport com.ibm.streamsx.topology.context.StreamsContext;%0Aimport com.ibm.streamsx.topology.context.StreamsContext.Type;%0Aimport com.ibm.streamsx.topology.context.StreamsContextFactory;%0Aimport com.ibm.streamsx.topology.spl.SPLStream;%0Aimport com.ibm.streamsx.topology.spl.SPLStreams;%0Aimport com.ibm.streamsx.topology.streams.StringStreams;%0Aimport com.ibm.streamsx.topology.test.AllowAll;%0Aimport com.ibm.streamsx.topology.test.TestTopology;%0Aimport com.ibm.streamsx.topology.tester.Condition;%0Aimport com.ibm.streamsx.topology.tester.Tester;%0A%0A/**%0A * endParallel() on non-parallel stream should not cause sc error%0A */%0Apublic class EndParallelTest extends TestTopology %7B%0A    %0A    @Before%0A    public void checkOK() %7B%0A        assumeSPLOk();%0A    %7D%0A%0A    @BeforeClass%0A    public static void maybeSkip() %7B%0A        assumeTrue(false); // TODO remove to enable the test class for error analysis%0A    %7D%0A  %0A    @Test%0A    public void testInvalidEndParallel() throws Exception %7B%0A%0A        Topology topology = newTopology(%22endParallel%22);%0A%0A        TStream%3CString%3E stream = topology.constants(Arrays.asList(%22Boom!%22));%0A        stream.endParallel(); // endParallel() on a stream that's not parallel%0A%0A        // should not generate invalid SPL%0A        this.getConfig().put(com.ibm.streamsx.topology.context.ContextProperties.KEEP_ARTIFACTS, Boolean.TRUE);%0A        StreamsContextFactory%0A                .getStreamsContext(StreamsContext.Type.STANDALONE_TESTER)%0A                .submit(topology).get();%0A    %7D   %0A%0A%7D%0A

test case for #1666