-
Notifications
You must be signed in to change notification settings - Fork 492
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
BlockDownloadingTest workaround #13032
Conversation
+ recheck after the change
Is the test flaky? If it is, we typically add this: https://github.com/zkSNACKs/WalletWasabi/blob/bd3a6d723ae88fa642f86673dcd717503edb82e9/WalletWasabi.Tests/UnitTests/PeriodicRunnerTests.cs#L9-L10 for tests that are time sensitive. |
I will give it a try, thanks. |
Similar to the PeriodicRunnerTests
@@ -104,7 +104,7 @@ public async Task TryGetBlockTests1Async() | |||
} | |||
|
|||
// Add small delay to make sure that things stabilize. | |||
await Task.Delay(100); | |||
await Task.Delay(2000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous change should make it so that this change is unnecessary.
await Task.Delay(2000); | |
await Task.Delay(100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
I feel like we are risking to rerun 1000+ tests (due to failure) for 2 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't take 2 seconds. There is no complex operation AFAIK.
Your PR title is called "BlockDownloadingTest fix". It's not a fix, it's just a workaround. If you want to fix, you should fix it properly - i.e. remove the Task.Delay completely and wait for the operation directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check tomorrow whether it works without delay.
This PR was such a mess......... All of this to modify a test that is not failing!! |
There were too many misunderstanding due to adding code to a pull request without any question. |
Honestly, your attitude is fascinating to me. My response would be "Sorry, I'll do better next time.". But perhaps I'm just too old in this modern world. |
Well let's see:
Took me more or less 40 minutes to finally merge it. A lot for a 2 lines PR that doesn't fix any problem. Hence, 2 lines PR or not, it was a mess. |
Trying to do something with it...