This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new ee6482f456 [ENHANCEMENT] Add a concurrent test for IMAP ID command
(#2673)
ee6482f456 is described below
commit ee6482f456a80912383c158199bdcb135df55aec
Author: Trần Hồng Quân <[email protected]>
AuthorDate: Fri Mar 14 16:01:12 2025 +0700
[ENHANCEMENT] Add a concurrent test for IMAP ID command (#2673)
---
.../apache/james/imapserver/netty/IMAPServerTest.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git
a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
index 54a76fdb86..21787e8b9e 100644
---
a/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
+++
b/server/protocols/protocols-imap4/src/test/java/org/apache/james/imapserver/netty/IMAPServerTest.java
@@ -3480,6 +3480,22 @@ class IMAPServerTest {
.contains("* ID (\"name\" \"Apache James\" \"version\"
\"3.9.0\")")
.contains("OK ID completed.");
}
+
+ @Test
+ void concurrentIdCommandsInTheSameSessionShouldSucceed() throws
Exception {
+ imapServer = createImapServer("imapServer.xml");
+
+ testIMAPClient.connect("127.0.0.1",
imapServer.getListenAddresses().getFirst().getPort());
+ ConcurrentTestRunner.builder()
+ .operation((threadNumber, step) -> {
+ assertThat(testIMAPClient.sendCommand("ID (\"name\"
\"Apache James\")"))
+ .contains("* ID NIL")
+ .contains("OK ID completed.");
+ })
+ .threadCount(20)
+ .operationCount(1)
+ .runSuccessfullyWithin(Duration.ofMinutes(5));
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]