Skip to content
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
@aschuhl

Description

@aschuhl

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions