File tree 1 file changed +5
-2
lines changed
logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/net
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ public class SMTPAppender_GreenTest {
67
67
68
68
static final boolean SYNCHRONOUS = false ;
69
69
static final boolean ASYNCHRONOUS = true ;
70
-
70
+ static int TIMEOUT = 3000 ;
71
+
71
72
int port = RandomUtil .getRandomServerPort ();
72
73
// GreenMail cannot be static. As a shared server induces race conditions
73
74
GreenMail greenMailServer ;
@@ -160,10 +161,12 @@ private MimeMultipart verifyAndExtractMimeMultipart(String subject)
160
161
return (MimeMultipart ) mm .getContent ();
161
162
}
162
163
164
+
165
+
163
166
void waitUntilEmailIsSent () throws InterruptedException {
164
167
ExecutorService es = loggerContext .getExecutorService ();
165
168
es .shutdown ();
166
- boolean terminated = es .awaitTermination (1000 , TimeUnit .MILLISECONDS );
169
+ boolean terminated = es .awaitTermination (TIMEOUT , TimeUnit .MILLISECONDS );
167
170
// this assertion may be needlessly strict
168
171
if (!terminated ) {
169
172
fail ("executor elapsed before accorded delay" );
You can’t perform that action at this time.
0 commit comments