You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix race condition in the PostgresChannelMessageTableSubscriberTests
Adding two messages into a group may end up with wrong insert order.
Or better to say the timestamp of first messages inserted might be behind in the future after the second one.
This leads to a wrong order return for polling operation and, therefore, verification in the test.
* Fix `PostgresChannelMessageTableSubscriberTests` inserting `Thread.sleep(100);`
between `messageStore.addMessageToGroup()` operations
Copy file name to clipboardExpand all lines: spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/postgres/PostgresChannelMessageTableSubscriberTests.java
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2022-2024 the original author or authors.
2
+
* Copyright 2022-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -88,7 +88,6 @@ CREATE FUNCTION INT_CHANNEL_MESSAGE_NOTIFY_FCT()
88
88
$BODY$
89
89
LANGUAGE PLPGSQL;
90
90
^^^ END OF SCRIPT ^^^
91
-
92
91
CREATE TRIGGER INT_CHANNEL_MESSAGE_NOTIFY_TRG
93
92
AFTER INSERT ON INT_CHANNEL_MESSAGE
94
93
FOR EACH ROW
@@ -150,6 +149,8 @@ public void testMessagePollMessagesAddedAfterStart() throws Exception {
0 commit comments