Skip to content

Fix timing issues with Should().NotThrowAfter()#1076

Merged
dennisdoomen merged 2 commits intofluentassertions:masterfrom
dennisdoomen:FixTiming
Jun 7, 2019
Merged

Fix timing issues with Should().NotThrowAfter()#1076
dennisdoomen merged 2 commits intofluentassertions:masterfrom
dennisdoomen:FixTiming

Conversation

@dennisdoomen
Copy link
Copy Markdown
Member

@dennisdoomen dennisdoomen commented Jun 4, 2019

Extended the existing ITimer abstraction and renamed it to IClock so all tests that rely on delays, waits and stopwatches can be tested in a reliable fashion. This should resolve the flakiness we've been experiences.

IMPORTANT

@dennisdoomen dennisdoomen force-pushed the FixTiming branch 3 times, most recently from 461a2c6 to f0ecd17 Compare June 4, 2019 20:31
Copy link
Copy Markdown
Contributor

@lg2de lg2de left a comment

Choose a reason for hiding this comment

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

Instead of "mystic" calculation of now in the TestingTimer I would prefer explicit control of timing within the tests.

@dennisdoomen dennisdoomen changed the title [WIP] Fix timing issues with Should().NotThrowAfter() Fix timing issues with Should().NotThrowAfter() Jun 5, 2019
@dennisdoomen dennisdoomen requested a review from jnyrup June 5, 2019 06:57
For some reason, the formatting specs that change global state are executed in a different order sometimes. This revealed a unexpected side-effect of changing the global configuration.
@dennisdoomen dennisdoomen requested a review from jnyrup June 6, 2019 16:44
Copy link
Copy Markdown
Member

@jnyrup jnyrup left a comment

Choose a reason for hiding this comment

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

But my two last comments still holds :)

@dennisdoomen
Copy link
Copy Markdown
Member Author

But my two last comments still holds :)

Which ones? I applied all your suggestions.

@dennisdoomen dennisdoomen merged commit 895ba26 into fluentassertions:master Jun 7, 2019
@dennisdoomen dennisdoomen deleted the FixTiming branch June 7, 2019 07:45
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