Skip to content

Conversation

@dmitry-worker
Copy link
Contributor

Description

FastSyncSpec is failing one test repeatedly for some reason at CI... couldn't reproduce it locally..
Maybe it has something to do with a number of builds running simultaneously. They probably share the same hardware for testing.

Proposed Solution

Increase the timeout for a test.

@dmitry-worker dmitry-worker force-pushed the feature/ETCM-503-tests-timeout-in-ci branch from 96c8100 to c728320 Compare December 30, 2020 22:15
@dmitry-worker dmitry-worker changed the title ETCM-503 testing in CI took very long time due to timeout of one of the test. [ETCM-503] testing in CI takes a lot of time Dec 30, 2020
@dmitry-worker dmitry-worker marked this pull request as ready for review December 31, 2020 10:05
with SpecFixtures
with WithActorSystemShutDown { self =>
implicit val timeout: Timeout = Timeout(10.seconds)
implicit val timeout: Timeout = Timeout(30.seconds)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that we have some tests that take more than 10 seconds to complete? We should improve those. If that's out of the scope of this PR maybe we can create a task to improve those tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Locally it runs for 2.6 seconds approximately. Maybe if I'll catch up with the logic of Fast/Regular sync it would be much easier to refactor these tests.

@dmitry-worker dmitry-worker requested a review from aakoshh January 4, 2021 16:00
Comment on lines 17 to 19
// The time counter counter
clock: Clock
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What was the problem with the way it was? I used an implicit just to make it a bit easier to return new instances of this otherwise immutable class.

Copy link
Contributor

Choose a reason for hiding this comment

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

It also seemed to make some sense that different parts of the app shouldn't have different clocks, so passing around an implicit one to whoever needs it might be better than threading it through. But ultimately it was only passed on in once place in this class so I get it if you don't like it.

Copy link
Contributor Author

@dmitry-worker dmitry-worker Jan 4, 2021

Choose a reason for hiding this comment

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

Made clock implicit again

// The following are implemented for completness' sake but not used:
override def getZone(): ZoneId = zoneId
override def withZone(x: ZoneId): Clock = new MockClock(currentTimeMillis, zoneId)
} No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to configure your editor to add a newline at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added newline

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

Thanks for the update, looks good!

As we discussed privately another option would have been to use Instant in the PeerStat type for firstSeenTime and lastSeenTime which has nanosecond precision, but this approach ultimately gives you full control.

@dmitry-worker dmitry-worker merged commit b7db87e into develop Jan 4, 2021
@dzajkowski dzajkowski deleted the feature/ETCM-503-tests-timeout-in-ci branch April 9, 2021 12:02
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.

4 participants