You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote JUnit tests using the Tester API in the Java topology. Using Topology Toolkit that was packaged with Streams 4.2.0.0, the tests runs fine. However, the same set of tests all fail using Topology Toolkit v1.6.0 packaged with Streams 4.2.1.0. Each of the tests returns the following exception:
java.lang.IllegalStateException: One use only
at com.ibm.streamsx.topology.internal.tester.TupleCollection.checkOneUse(TupleCollection.java:467)
at com.ibm.streamsx.topology.internal.tester.TupleCollection.complete(TupleCollection.java:484)
at com.ibm.streamsx.topology.internal.tester.TupleCollection.complete(TupleCollection.java:480)
...
Calling complete(StreamsContext<?> context, Condition<?> endCondition, long timeout, TimeUnit unit) calls checkOneUse(), followed by a call to an overloaded version of complete() that again calls checkOneUse(). I don't think the first call to checkOneUse() is required since it's going to get called in the overloaded method anyway.
Workaround: Call complete(StreamsContext<?> context, Map<String,Object> config, Condition<?> endCondition, long timeout, TimeUnit unit) and pass in an empty Map for config.
The text was updated successfully, but these errors were encountered:
I wrote JUnit tests using the Tester API in the Java topology. Using Topology Toolkit that was packaged with Streams 4.2.0.0, the tests runs fine. However, the same set of tests all fail using Topology Toolkit v1.6.0 packaged with Streams 4.2.1.0. Each of the tests returns the following exception:
The problem is here: https://github.com/IBMStreams/streamsx.topology/blob/master/java/src/com/ibm/streamsx/topology/internal/tester/TupleCollection.java#L478-L480
Calling
complete(StreamsContext<?> context, Condition<?> endCondition, long timeout, TimeUnit unit)
callscheckOneUse()
, followed by a call to an overloaded version ofcomplete()
that again callscheckOneUse()
. I don't think the first call tocheckOneUse()
is required since it's going to get called in the overloaded method anyway.Workaround: Call
complete(StreamsContext<?> context, Map<String,Object> config, Condition<?> endCondition, long timeout, TimeUnit unit)
and pass in an emptyMap
for config.The text was updated successfully, but these errors were encountered: