From 53e3248d739f98eb691bea6ec3cd2fe3ba1a4c72 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Mon, 7 Jan 2019 12:42:55 -0500 Subject: [PATCH] Make Test IMAP Server fields volatile `resetServer()` runs on a different thread. --- .../springframework/integration/test/mail/TestMailServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-integration-test-support/src/main/java/org/springframework/integration/test/mail/TestMailServer.java b/spring-integration-test-support/src/main/java/org/springframework/integration/test/mail/TestMailServer.java index 04efe5ac0f..0c3cc328fa 100644 --- a/spring-integration-test-support/src/main/java/org/springframework/integration/test/mail/TestMailServer.java +++ b/spring-integration-test-support/src/main/java/org/springframework/integration/test/mail/TestMailServer.java @@ -215,9 +215,9 @@ public class TestMailServer { public static class ImapServer extends MailServer { - private boolean seen; + private volatile boolean seen; - private boolean idled; + private volatile boolean idled; ImapServer(int port) throws IOException { super(port);