Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@luis3m
Copy link
Contributor

@luis3m luis3m commented Aug 28, 2020

Closes #4039

@luis3m luis3m requested a review from iravid as a code owner August 28, 2020 18:13
Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

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

Great fix. I have a small concern about potential flakiness in the test. We can merge afterwards.

value <- queue.takeAll
_ <- queue.shutdown
} yield assert(value)(equalTo(List(1, 2, 3, 4, 5)))
} @@ zioTag(errors),
Copy link
Member

Choose a reason for hiding this comment

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

Can you do a few runs with nonFlaky(50000) locally to verify the test is not flaky? Some parts of it (usage of TestClock with no advancing, use of takeAll which is not deterministic) make me a bit wary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just ran it locally with nonFlaky(50000) ten times. No failures.

sdriver <- schedule.driver.toManaged_
lastChunk <- ZRef.makeManaged[Chunk[P]](Chunk.empty)
producer = Take.fromPull(pull).repeatWhileM(take => handoff.offer(take).as(!take.isDone))
producer = Take.fromPull(pull).repeatWhileM(take => handoff.offer(take).as(take.isSuccess))
Copy link
Member

Choose a reason for hiding this comment

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

Great fix 👍

@luis3m luis3m force-pushed the aggregateAsyncWithin branch from 5e9236a to 7a8967d Compare August 29, 2020 20:13
Copy link
Member

@iravid iravid left a comment

Choose a reason for hiding this comment

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

Thank you @luis3m!

@luis3m
Copy link
Contributor Author

luis3m commented Aug 29, 2020

@iravid ready for review again

@iravid iravid merged commit 02f314e into zio:master Aug 30, 2020
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.

AggregateAsyncWithin does not fail fast - it goes to next element before failing

2 participants