[feed] Try to make tests more stable (#9565)

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
This commit is contained in:
Fabian Wolter 2020-12-29 14:42:17 +01:00 committed by GitHub
parent bf2d40c5bc
commit 235a719ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,11 +169,13 @@ public class FeedHandlerTest extends JavaOSGiTest {
unregisterFeedTestServlet(); unregisterFeedTestServlet();
// Wait for FeedHandler to be unregistered if (feedThing != null) {
waitForAssert(() -> { // Wait for FeedHandler to be unregistered
feedHandler = (FeedHandler) feedThing.getHandler(); waitForAssert(() -> {
assertThat(feedHandler, is(nullValue())); feedHandler = (FeedHandler) feedThing.getHandler();
}); assertThat(feedHandler, is(nullValue()));
});
}
} }
private synchronized void registerFeedTestServlet() { private synchronized void registerFeedTestServlet() {