File tree 1 file changed +5
-1
lines changed
publish-subscribe/src/test/java/com/iluwatar/publish/subscribe/subscriber
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 13
13
import java .util .concurrent .TimeUnit ;
14
14
import org .junit .jupiter .api .Test ;
15
15
import org .junit .jupiter .api .extension .RegisterExtension ;
16
+ import org .slf4j .Logger ;
17
+ import org .slf4j .LoggerFactory ;
16
18
17
19
public class SubscriberTest {
18
20
21
+ private static final Logger logger = LoggerFactory .getLogger (SubscriberTest .class );
19
22
@ RegisterExtension public LoggerExtension loggerExtension = new LoggerExtension ();
20
23
21
24
private static final String TOPIC_WEATHER = "WEATHER" ;
@@ -173,7 +176,8 @@ private void waitForOutput() {
173
176
try {
174
177
TimeUnit .SECONDS .sleep (1 );
175
178
} catch (InterruptedException e ) {
176
- throw new RuntimeException (e );
179
+ logger .error ("Interrupted!" , e );
180
+ Thread .currentThread ().interrupt ();
177
181
}
178
182
}
179
183
}
You can’t perform that action at this time.
0 commit comments