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

Update tests to have less collisions of resources and remove Timecop #459

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

miry
Copy link
Contributor

@miry miry commented Dec 13, 2022

NetHTTP setup method to clean all resources.
Remove usage of Timecop in redis adapaters.
Update circuite breaker tests to have initialization of resource in multiple lines.

@miry miry self-assigned this Dec 13, 2022
@miry miry added the Semian label Dec 13, 2022
time_travel(time_circuit_half_open) do
assert_redis_timeout_in_delta(expected_timeout: half_open_resource_timeout) do
assert_redis_timeout_in_delta(expected_timeout: half_open_resource_timeout) do
time_travel(time_circuit_half_open) do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed order, because assert_redis_timeout_in_delta uses Benchmark.measure that uses Process.clock_gettime(Process::CLOCK_MONOTONIC).

@miry miry marked this pull request as ready for review December 13, 2022 15:57
@miry miry force-pushed the tests_reformating branch from 4cfb84a to 7ca8917 Compare December 13, 2022 16:00
@miry miry changed the title Update tests to have less collisions of resources Update tests to have less collisions of resources and remove Timecop Dec 13, 2022
NetHTTP setup method to clean all resources.
Update single tests to check resource state.
Remove timecop from gemfiles.
Disable Minitest/AssertPredicate for linting.
@miry miry force-pushed the tests_reformating branch from 5ef968b to 8f800c1 Compare December 13, 2022 16:47
@miry miry merged commit 8f800c1 into Shopify:master Dec 13, 2022
@miry miry deleted the tests_reformating branch December 13, 2022 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants