You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2023/01/24 07:35:09 UTC
[plc4x] branch develop updated: fix(plc4j/connection-cache): Increased the setup timeout to possibly get the test running on jenkins.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new ee18ebd734 fix(plc4j/connection-cache): Increased the setup timeout to possibly get the test running on jenkins.
ee18ebd734 is described below
commit ee18ebd734e11bb1c06af5f1ac865c23e7878640
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Jan 24 08:35:02 2023 +0100
fix(plc4j/connection-cache): Increased the setup timeout to possibly get the test running on jenkins.
---
.../apache/plc4x/java/utils/cache/CachedPlcConnectionManagerTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plc4j/tools/connection-cache/src/test/java/org/apache/plc4x/java/utils/cache/CachedPlcConnectionManagerTest.java b/plc4j/tools/connection-cache/src/test/java/org/apache/plc4x/java/utils/cache/CachedPlcConnectionManagerTest.java
index 9d71bc4701..d638195bad 100644
--- a/plc4j/tools/connection-cache/src/test/java/org/apache/plc4x/java/utils/cache/CachedPlcConnectionManagerTest.java
+++ b/plc4j/tools/connection-cache/src/test/java/org/apache/plc4x/java/utils/cache/CachedPlcConnectionManagerTest.java
@@ -118,6 +118,7 @@ public class CachedPlcConnectionManagerTest {
*/
@Test
public void testDoubleConnectionRequestTimeoutTest() throws Exception {
+ // Create a connectionManager with a maximum wait time of 50ms
PlcConnectionManager mockConnectionManager = Mockito.mock(PlcConnectionManager.class);
CachedPlcConnectionManager connectionManager = CachedPlcConnectionManager.getBuilder(mockConnectionManager).withMaxWaitTime(Duration.ofMillis(50)).build();
@@ -133,7 +134,7 @@ public class CachedPlcConnectionManagerTest {
})).start();
// This is needed as starting the previous thread seems to take a little-bit of time.
- Thread.sleep(1L);
+ Thread.sleep(10L);
// Get the same connection a second time.
try (PlcConnection ignored = connectionManager.getConnection("test")) {