Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't test for table build delays? #54

Open
Miles-Garnsey opened this issue Jun 7, 2019 · 0 comments
Open

Can't test for table build delays? #54

Miles-Garnsey opened this issue Jun 7, 2019 · 0 comments

Comments

@Miles-Garnsey
Copy link

Miles-Garnsey commented Jun 7, 2019

When Kafka builds a local table, it often takes some time to stream all of the records in. This means that doing a join against this table may fail due to the matching record not yet appearing.

I am trying to write a test to detect this issue, with topology and inputs as below;

val mstreams = MockedStreams()
     .topology(b => {
       ...some join logic...
       })
       .input(StreamforTable,
       someserde,
       someserde,
       irrelevantInputForTable) //A seq with 100 000 elements.
      .input(StreamForTable,
       someserde,
       someserde,
       relevantInputForTable) // A seq with one element that matches the third input() call.
     .input(StreamToJoin,
       someserde,
       someserde,
       singleRecordShouldMatch)

The intention is that the irrelevant input (in the first call to input()) should overwhelm the app, causing a delay in adding the relevant input (in the second call to input()) to the table. The join should then fail. But it appears that the input() calls are processed sequentially, which means that this isn't working.

Does anyone have any ideas on how to write this test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant