Skip to content

Migrate publisher tests #155

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

Conversation

AlexandreCarlton
Copy link
Collaborator

In this pull request we:

  • move across the *BatchPublisher tests into DataLoaderTest to obtain the same coverage with less code.
  • fix MappedBatchPublisher loader to function without a cache (which would otherwise not work as we were completing only the last future found for a given key).

We now have the same coverage but with less code. Note that:

 - this is currently failing on 'duplicate keys when caching disabled'.
 - we still need to add tests that only make sense for the Publisher
   variants (e.g. half-completed keys).
If we did not cache the futures, then the MappedBatchPublisher
DataLoader would not work as we were only completing the last future for
a given key.
Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

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

Nice one

@bbakerman bbakerman merged commit 8295396 into graphql-java:reactive-streams-branch May 22, 2024
@dondonz dondonz added this to the 3.4.0 milestone Dec 16, 2024
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