You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2023/06/16 12:33:26 UTC

[plc4x] branch develop updated: test(plc4go/cbus): fix failing test

This is an automated email from the ASF dual-hosted git repository.

sruehl 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 66166b6e01 test(plc4go/cbus): fix failing test
66166b6e01 is described below

commit 66166b6e012dc3f227b26d5be364bce9ffec914b
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jun 16 14:33:19 2023 +0200

    test(plc4go/cbus): fix failing test
---
 plc4go/internal/cbus/Connection_test.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/plc4go/internal/cbus/Connection_test.go b/plc4go/internal/cbus/Connection_test.go
index cf7abc86e1..566c89d897 100644
--- a/plc4go/internal/cbus/Connection_test.go
+++ b/plc4go/internal/cbus/Connection_test.go
@@ -522,7 +522,7 @@ func TestConnection_String(t *testing.T) {
 ║╔═driverContext═══════════════════════════════════╗                                                      ║
 ║║╔═DriverContext═════════════════════════════════╗║                                                      ║
 ║║║╔═awaitSetupComplete╗╔═awaitDisconnectComplete╗║║                                                      ║
-║║║║     b0 true       ║║        b0 true         ║║║                                                      ║
+║║║║      b0 true      ║║         b0 true        ║║║                                                      ║
 ║║║╚═══════════════════╝╚════════════════════════╝║║                                                      ║
 ║║╚═══════════════════════════════════════════════╝║                                                      ║
 ║╚═════════════════════════════════════════════════╝                                                      ║
@@ -721,6 +721,7 @@ func TestConnection_fireConnected(t *testing.T) {
 		subscribers   []*Subscriber
 		tm            transactions.RequestTransactionManager
 		configuration Configuration
+		driverContext DriverContext
 		connectionId  string
 		tracer        tracer.Tracer
 	}
@@ -741,6 +742,9 @@ func TestConnection_fireConnected(t *testing.T) {
 		},
 		{
 			name: "notified connect",
+			fields: fields{
+				driverContext: driverContextForTesting(),
+			},
 			args: args{ch: make(chan<- plc4go.PlcConnectionConnectResult, 1)},
 			chanValidator: func(t *testing.T, results chan<- plc4go.PlcConnectionConnectResult) bool {
 				time.Sleep(time.Millisecond * 50)
@@ -755,7 +759,7 @@ func TestConnection_fireConnected(t *testing.T) {
 				subscribers:   tt.fields.subscribers,
 				tm:            tt.fields.tm,
 				configuration: tt.fields.configuration,
-				driverContext: driverContextForTesting(),
+				driverContext: tt.fields.driverContext,
 				connectionId:  tt.fields.connectionId,
 				tracer:        tt.fields.tracer,
 				log:           testutils.ProduceTestingLogger(t),