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

WIP: Feat/tck #33

Merged
merged 1 commit into from
May 21, 2021
Merged

WIP: Feat/tck #33

merged 1 commit into from
May 21, 2021

Conversation

ptitFicus
Copy link
Member

No description provided.

@ptitFicus ptitFicus force-pushed the feat/tck branch 2 times, most recently from 6c31f18 to d5cc91c Compare May 4, 2021 14:08
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented May 5, 2021

Unit Test Results

13 files  ±0  13 suites  ±0   2m 54s ⏱️ ±0s
80 tests ±0  80 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 1f9e4d5. ± Comparison against base commit 1f9e4d5.

♻️ This comment has been updated with latest results.

@@ -17,7 +17,7 @@ jobs:
run: sbt publishLocal
- name: Run test
id: test
run: JAVA_OPTS="--enable-preview" sbt test
run: JAVA_OPTS="--enable-preview" sbt "project thoth-core" test && sbt "project thoth-jooq" test && sbt "project thoth-jooq-async" test && sbt "project thoth-kafka-goodies" test && sbt "project thoth-tck" test
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ease tests debug with github actions (otherwise logs are mixed up)

stop.toCompletableFuture().join();
assertThat(isStopping.get()).isTrue();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid race condition : once in a while, isStopping is not yet set to true right after "stop" call

@@ -196,7 +196,7 @@ public void eventConsumptionWithEventFromDb() throws IOException {
assertThat(events).hasSize(6);

verify(eventStore, times(1)).markAsPublished(any(), Mockito.<List<EventEnvelope<TestEvent, Void, Void>>>any());
verify(eventStore, times(1)).markAsPublished(Mockito.<List<EventEnvelope<TestEvent, Void, Void>>>any());
verify(eventStore, atLeastOnce()).markAsPublished(Mockito.<List<EventEnvelope<TestEvent, Void, Void>>>any());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a race condition here as well, perhaps in some cases akka loads events from DB in two batchs ?

try {
return eventStore.loadAllEvents().runWith(Sink.seq(), actorSystem).toCompletableFuture().get();
} catch (InterruptedException e) {
throw new RuntimeException(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can group it catch (InterruptedException | ExecutionException e)

for(EventEnvelope<TestEvent, Tuple0, Tuple0> env: envelopes) {
if(result.stream().noneMatch(env2 -> env2.id.equals(env.id))) {
result.add(env);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return envelopes.distinctBy(env -> env.id);

@ptitFicus ptitFicus merged commit 1f9e4d5 into master May 21, 2021
MatthieuMAIF pushed a commit to MatthieuMAIF/thoth that referenced this pull request Jun 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants