This repository was archived by the owner on Mar 11, 2024. It is now read-only.
This repository was archived by the owner on Mar 11, 2024. It is now read-only.
assertStream always passes #78
Open
Description
I am attempting to write a unit test on my DataStream, but it is constantly passing. Here is my code:
testEnv = DataStreamTestEnvironment.createTestEnvironment(1);
createTestStream(Arrays.asList(eventStreamPayload));
DataStream<JSONObject> dataStream = createTestStream(Arrays.asList(eventStreamPayload)).flatMap(new myFlatMap());
TestSink<JSONObject> outputFormat = createTestSink(hasItems(new JSONObject(eventStreamPayload2)));
dataStream.addSink(outputFormat);
JSONObject jsonObject = new JSONObject(eventStreamPayload2);
assertStream(dataStream, hasItems(jsonObject));
Now in the above case, eventStreamPayload and eventStreamPayload2 are different and myFlatMap() modifies eventStreamPayload as well. Yet the TestSink and assertStream is always passing. What am I a missing?