Repository navigation
Conversation
|
@antkorwin Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@antkorwin Thank you for signing the Contributor License Agreement! |
sbrannen
left a comment
There was a problem hiding this comment.
Thanks for the PR.
I've requested a few changes to reduce the noise in this PR.
So let's see how it looks after you've made those changes.
| import org.springframework.tests.sample.beans.TestBean; | ||
| import org.springframework.util.asyncassert.AsyncAssert; | ||
|
|
||
| import java.util.concurrent.TimeUnit; |
There was a problem hiding this comment.
Please undo all changes to import ordering and use of import wildcards in this PR.
See the following for details: https://github.com/spring-projects/spring-framework/wiki/Code-Style#import-statements
| fail("Should have thrown ExecutionException"); | ||
| } | ||
| catch (ExecutionException ex) { | ||
| } catch (ExecutionException ex) { |
There was a problem hiding this comment.
Please undo all removal of newlines before catch statements.
See the following for details: https://github.com/spring-projects/spring-framework/wiki/Code-Style#braces
| * @param unit unit of time | ||
| * @return AsyncAssert with new settings of polling. | ||
| */ | ||
| public AsyncAssert polling(long amount, TimeUnit unit) { |
There was a problem hiding this comment.
Please use java.time.Duration instead of implementing a custom type.
| * @param unit unit of time | ||
| * @return AsyncAssert with new settings of timeout | ||
| */ | ||
| public AsyncAssert timeout(long amount, TimeUnit unit) { |
There was a problem hiding this comment.
Please use java.time.Duration instead of implementing a custom type.
| import static org.junit.Assert.assertEquals; | ||
|
|
||
| /** | ||
| * Created on 23.08.2018. |
There was a problem hiding this comment.
Please remove all such "Created on" JavaDoc entries in this PR.
|
This has been merged into Thanks |
I fixed the problem with a fragile tests for asynchronous events.
Also I add the AsyncAssert utility for write an asynchronous test with a better performance than test which use a Thread.sleep(1000)
I've a next result for pass of changed tests on my computer:
before ~30 sec.
after ~12 sec.