Skip to content

Fix occasionally failing "video comments and reactions" test#4421

Merged
mnaamani merged 2 commits intoJoystream:carthagefrom
Lezek123:fix-comments-reactions-test
Nov 6, 2022
Merged

Fix occasionally failing "video comments and reactions" test#4421
mnaamani merged 2 commits intoJoystream:carthagefrom
Lezek123:fix-comments-reactions-test

Conversation

@Lezek123
Copy link
Copy Markdown
Contributor

@Lezek123 Lezek123 commented Nov 2, 2022

SSIA

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Nov 3, 2022 at 0:38AM (UTC)

Comment on lines +66 to +67
this.events.map((e, i) => {
const qEvent = this.findMatchingQueryNodeEvent(e, qEvents)
Copy link
Copy Markdown
Contributor

@zeeshanakram3 zeeshanakram3 Nov 3, 2022

Choose a reason for hiding this comment

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

  1. Does this change entails that previously some values of qEvent were wrong? Logically this change seems to be doing the same thing; in fact, redundant as qEvents is basically a filtered list of all CommentCreatedEvents.
  2. If this fixes the integration test, then do we need to apply similar changes to other fixtures, e.g., EditCommentFixture, DeleteCommentFixture, etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. The difference is that qEvents are not sorted in a deterministic way, while this.events are, so if you iterate over this.events, you can be sure that you will get correct params when accessing this.commentsParams[i]
  2. Good point, I didn't notice there were other fixtures with this mistake, will fix

Copy link
Copy Markdown
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

LGTM

@mnaamani mnaamani merged commit e72b2b8 into Joystream:carthage Nov 6, 2022
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.

3 participants