-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cleanup httpurlconnection androidTests #503
Cleanup httpurlconnection androidTests #503
Conversation
} else { | ||
// if all tasks don't finish before timeout | ||
Assert.fail( | ||
fail( | ||
"Test could not be completed as tasks did not complete within the 2s timeout period.", | ||
) | ||
} | ||
} catch (e: InterruptedException) { |
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.
Preference is to just let the exception escape the method and the test will still fail.
@@ -67,46 +70,39 @@ class InstrumentationTest { | |||
// Wait for all tasks to finish execution or timeout | |||
if (executor.awaitTermination(2, TimeUnit.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.
instead if if
you can just wrap with assertTrue()
and remove the else
block entirely.
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.
Updated, That makes the code cleaner! Thanks :)
This PR cleans up httpurlconnection androidTests based on learnings and discussions from PR #452 and PR #500: