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/12/04 08:23:38 UTC

(plc4x) branch develop updated: fix: Reduced the wait between the two executions as some times the first operation already is finished.

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 edbce97442 fix: Reduced the wait between the two executions as some times the first operation already is finished.
edbce97442 is described below

commit edbce97442fb796a18bd672bd9b38fbdaaf8e605
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Mon Dec 4 09:23:29 2023 +0100

    fix: Reduced the wait between the two executions as some times the first operation already is finished.
---
 plc4go/pkg/api/cache/PlcConnectionCache_test.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plc4go/pkg/api/cache/PlcConnectionCache_test.go b/plc4go/pkg/api/cache/PlcConnectionCache_test.go
index ee9642adfa..332b7d0385 100644
--- a/plc4go/pkg/api/cache/PlcConnectionCache_test.go
+++ b/plc4go/pkg/api/cache/PlcConnectionCache_test.go
@@ -377,7 +377,8 @@ func TestPlcConnectionCache_MultipleConcurrentConnectionRequests(t *testing.T) {
 			"ping-success",
 		}, 1)
 
-	time.Sleep(1 * time.Millisecond)
+	// Sleep for a 1000th of a millisecond.
+	time.Sleep(1000 * time.Nanosecond)
 
 	// Almost instantly request the same connection for a second time.
 	// As the connection takes 100ms, the second connection request will come