KAFKA-7536: Initialize TopologyTestDriver with non-null topic#5923
KAFKA-7536: Initialize TopologyTestDriver with non-null topic#5923guozhangwang merged 4 commits intoapache:trunkfrom
Conversation
| ); | ||
| globalStateTask.initialize(); | ||
| globalProcessorContext.setRecordContext(new ProcessorRecordContext(0L, -1L, -1, null, new RecordHeaders())); | ||
| globalProcessorContext.setRecordContext(new ProcessorRecordContext(0, -1L, -1, ProcessorContextImpl.NONEXIST_TOPIC, new RecordHeaders())); |
There was a problem hiding this comment.
Nit: why change 0L to 0 ? Timestamp is of type long. (sam below)
| Stores.inMemoryKeyValueStore("aggStore"), | ||
| Serdes.String(), | ||
| Serdes.Long()), | ||
| Serdes.Long()).withCachingEnabled(), // intentionally turn on caching to achieve better test coverage |
There was a problem hiding this comment.
I would prefer a separate test: shouldAllowPrePopulatingStatesStoresWithCachingEnabled()
|
@mjsax addressed comments. |
bbejeck
left a comment
There was a problem hiding this comment.
Thanks for this @guozhangwang. LGTM
|
failures unrelated restest this please |
mjsax
left a comment
There was a problem hiding this comment.
One nit.
LGTM. Feel free to merge.
Test timed out. Retest this please.
| topology.addStateStore(Stores.keyValueStoreBuilder( | ||
| Stores.inMemoryKeyValueStore("aggStore"), | ||
| Serdes.String(), | ||
| Serdes.Long()).withCachingEnabled(), // intentionally turn on caching to achieve better test coverage |
There was a problem hiding this comment.
nit: we can remove this comment, as the test name explains it :)
In TopologyTestDriver constructor set non-null topic; and in unit test intentionally turn on caching to verify this case. Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
In TopologyTestDriver constructor set non-null topic; and in unit test intentionally turn on caching to verify this case. Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
|
I tried to cherry-pick to the earliest branch (1.1) but realized it has a few other diffs like KAFKA-6967 in the middle which are not cherry-picked either and hence making the divergence too large. Instead I'd only cherry-pick to 2.0 and 2.1. |
…#5923) In TopologyTestDriver constructor set non-null topic; and in unit test intentionally turn on caching to verify this case. Reviewers: Bill Bejeck <bill@confluent.io>, Matthias J. Sax <matthias@confluent.io>
In TopologyTestDriver constructor set non-null topic; and in unit test intentionally turn on caching to verify this case.
Committer Checklist (excluded from commit message)