Skip to content

Commit 3b5d041

Browse files
committed
allow more time for timetout
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent b0876e5 commit 3b5d041

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

logback-classic-blackbox/src/test/java/ch/qos/logback/classic/blackbox/net/SMTPAppender_GreenTest.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public class SMTPAppender_GreenTest {
6767

6868
static final boolean SYNCHRONOUS = false;
6969
static final boolean ASYNCHRONOUS = true;
70-
70+
static int TIMEOUT = 3000;
71+
7172
int port = RandomUtil.getRandomServerPort();
7273
// GreenMail cannot be static. As a shared server induces race conditions
7374
GreenMail greenMailServer;
@@ -160,10 +161,12 @@ private MimeMultipart verifyAndExtractMimeMultipart(String subject)
160161
return (MimeMultipart) mm.getContent();
161162
}
162163

164+
165+
163166
void waitUntilEmailIsSent() throws InterruptedException {
164167
ExecutorService es = loggerContext.getExecutorService();
165168
es.shutdown();
166-
boolean terminated = es.awaitTermination(1000, TimeUnit.MILLISECONDS);
169+
boolean terminated = es.awaitTermination(TIMEOUT, TimeUnit.MILLISECONDS);
167170
// this assertion may be needlessly strict
168171
if(!terminated) {
169172
fail("executor elapsed before accorded delay");

0 commit comments

Comments
 (0)