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/14 11:36:12 UTC

[plc4x] branch develop updated (dfe1459f02 -> a59ec19248)

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

sruehl pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


    from dfe1459f02 feat(plc4go/cbus): more log details on the connection process
     new de1c69b3ff test(plc4go/cbus): trace workers on one flaky test
     new a59ec19248 test(plc4go/cache): hook in correct logger

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 plc4go/internal/cbus/Browser_test.go               | 14 ++--
 plc4go/pkg/api/cache/PlcConnectionCache_test.go    | 82 +++++++++++++---------
 plc4go/pkg/api/cache/connectionContainer_test.go   |  5 --
 plc4go/pkg/api/cache/plcConnectionLease_test.go    | 73 +++++++++++--------
 .../drivers/tests/manual_bacnet_PcapTest_test.go   | 10 ++-
 5 files changed, 109 insertions(+), 75 deletions(-)


[plc4x] 01/02: test(plc4go/cbus): trace workers on one flaky test

Posted by sr...@apache.org.
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

commit de1c69b3ff94e4b557b5409bcdb31d76c53406e8
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Jun 14 13:25:36 2023 +0200

    test(plc4go/cbus): trace workers on one flaky test
---
 plc4go/internal/cbus/Browser_test.go | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/plc4go/internal/cbus/Browser_test.go b/plc4go/internal/cbus/Browser_test.go
index f89593b75f..e150f04f8f 100644
--- a/plc4go/internal/cbus/Browser_test.go
+++ b/plc4go/internal/cbus/Browser_test.go
@@ -22,6 +22,7 @@ package cbus
 import (
 	"context"
 	"fmt"
+	"github.com/apache/plc4x/plc4go/spi/pool"
 	"net/url"
 	"sync/atomic"
 	"testing"
@@ -369,12 +370,15 @@ func TestBrowser_getInstalledUnitAddressBytes(t *testing.T) {
 				// Set the model logger to the logger above
 				testutils.SetToTestingLogger(t, readWriteModel.Plc4xModelLog)
 
-				// Custom option for that
-				loggerOption := options.WithCustomLogger(logger)
+				// Custom options for that
+				_options := []options.WithOption{
+					options.WithCustomLogger(logger),
+					pool.WithExecutorOptionTracerWorkers(true),
+				}
 
-				transport := test.NewTransport(loggerOption)
+				transport := test.NewTransport(_options...)
 				transportUrl := url.URL{Scheme: "test"}
-				transportInstance, err := transport.CreateTransportInstance(transportUrl, nil, loggerOption)
+				transportInstance, err := transport.CreateTransportInstance(transportUrl, nil, _options...)
 				require.NoError(t, err)
 				t.Cleanup(func() {
 					assert.NoError(t, transportInstance.Close())
@@ -431,7 +435,7 @@ func TestBrowser_getInstalledUnitAddressBytes(t *testing.T) {
 				})
 				err = transport.AddPreregisteredInstances(transportUrl, transportInstance)
 				require.NoError(t, err)
-				connectionConnectResult := <-NewDriver(loggerOption).GetConnection(transportUrl, map[string]transports.Transport{"test": transport}, map[string][]string{})
+				connectionConnectResult := <-NewDriver(_options...).GetConnection(transportUrl, map[string]transports.Transport{"test": transport}, map[string][]string{})
 				if err := connectionConnectResult.GetErr(); err != nil {
 					t.Error(err)
 					t.FailNow()


[plc4x] 02/02: test(plc4go/cache): hook in correct logger

Posted by sr...@apache.org.
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

commit a59ec192483ae4d40d0c60e0c1e343a17f4df999
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed Jun 14 13:36:03 2023 +0200

    test(plc4go/cache): hook in correct logger
---
 plc4go/pkg/api/cache/PlcConnectionCache_test.go    | 82 +++++++++++++---------
 plc4go/pkg/api/cache/connectionContainer_test.go   |  5 --
 plc4go/pkg/api/cache/plcConnectionLease_test.go    | 73 +++++++++++--------
 .../drivers/tests/manual_bacnet_PcapTest_test.go   | 10 ++-
 4 files changed, 100 insertions(+), 70 deletions(-)

diff --git a/plc4go/pkg/api/cache/PlcConnectionCache_test.go b/plc4go/pkg/api/cache/PlcConnectionCache_test.go
index ff38457112..b367d65e8e 100644
--- a/plc4go/pkg/api/cache/PlcConnectionCache_test.go
+++ b/plc4go/pkg/api/cache/PlcConnectionCache_test.go
@@ -20,6 +20,7 @@
 package cache
 
 import (
+	"github.com/stretchr/testify/require"
 	"testing"
 	"time"
 
@@ -115,18 +116,12 @@ func TestPlcConnectionCache_Close(t *testing.T) {
 		name        string
 		fields      fields
 		args        args
+		setup       func(t *testing.T, fields *fields, args *args)
 		wantErr     bool
 		wantTimeout bool
 	}{
 		{
 			name: "simple",
-			fields: fields{
-				driverManager: func() plc4go.PlcDriverManager {
-					driverManager := plc4go.NewPlcDriverManager()
-					driverManager.RegisterDriver(simulated.NewDriver())
-					return driverManager
-				}(),
-			},
 			args: args{
 				connectionStrings: []string{
 					"simulated://1.2.3.4:42",
@@ -134,17 +129,24 @@ func TestPlcConnectionCache_Close(t *testing.T) {
 					"simulated://0.8.1.15:7",
 				},
 			},
+			setup: func(t *testing.T, fields *fields, args *args) {
+				logger := testutils.ProduceTestingLogger(t)
+
+				driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+				driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
+				fields.driverManager = driverManager
+			},
 			wantErr:     false,
 			wantTimeout: false,
 		},
 		{
 			name: "empty close",
-			fields: fields{
-				driverManager: func() plc4go.PlcDriverManager {
-					driverManager := plc4go.NewPlcDriverManager()
-					driverManager.RegisterDriver(simulated.NewDriver())
-					return driverManager
-				}(),
+			setup: func(t *testing.T, fields *fields, args *args) {
+				logger := testutils.ProduceTestingLogger(t)
+
+				driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+				driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
+				fields.driverManager = driverManager
 			},
 			wantErr:     false,
 			wantTimeout: false,
@@ -152,6 +154,9 @@ func TestPlcConnectionCache_Close(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
+			if tt.setup != nil {
+				tt.setup(t, &tt.fields, &tt.args)
+			}
 			cc := NewPlcConnectionCache(tt.fields.driverManager)
 			// Connect to all sources first
 			for _, connectionString := range tt.args.connectionStrings {
@@ -263,8 +268,9 @@ func executeAndTestReadFromPlc(t *testing.T, cache plcConnectionCache, connectio
 }
 
 func TestPlcConnectionCache_ReusingAnExistingConnection(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -312,7 +318,7 @@ func TestPlcConnectionCache_ReusingAnExistingConnection(t *testing.T) {
 
 	assert.NotNil(t, cache.GetTracer(), "Tracer should be available")
 	traces := cache.GetTracer().GetTraces()
-	assert.Equal(t, 5, len(traces), "Unexpected number of trace entries")
+	require.Equal(t, 5, len(traces), "Unexpected number of trace entries")
 	// First is needs to create a new container for this connection
 	assert.Equal(t, "create new cached connection", traces[0].Message, "Unexpected message")
 	// Then it gets a lease for the connection
@@ -324,8 +330,9 @@ func TestPlcConnectionCache_ReusingAnExistingConnection(t *testing.T) {
 }
 
 func TestPlcConnectionCache_MultipleConcurrentConnectionRequests(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -380,7 +387,7 @@ func TestPlcConnectionCache_MultipleConcurrentConnectionRequests(t *testing.T) {
 	// This should be quite equal to the serial case as the connections are requested serially.
 	assert.NotNil(t, cache.GetTracer(), "Tracer should be available")
 	traces := cache.GetTracer().GetTraces()
-	assert.Equal(t, 5, len(traces), "Unexpected number of trace entries")
+	require.Equal(t, 5, len(traces), "Unexpected number of trace entries")
 	// First is needs to create a new container for this connection
 	assert.Equal(t, "create new cached connection", traces[0].Message, "Unexpected message")
 	// Then it gets a lease for the connection
@@ -394,8 +401,9 @@ func TestPlcConnectionCache_MultipleConcurrentConnectionRequests(t *testing.T) {
 }
 
 func TestPlcConnectionCache_ConnectWithError(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -430,8 +438,9 @@ func TestPlcConnectionCache_ConnectWithError(t *testing.T) {
 // putting it back into the cache will return an error, hereby marking
 // the connection as invalid
 func TestPlcConnectionCache_ReturningConnectionWithPingError(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -485,8 +494,9 @@ func TestPlcConnectionCache_ReturningConnectionWithPingError(t *testing.T) {
 // In this test, we'll make the ping operation take longer than the timeout in the connection cache
 // Therefore the error handling should kick in.
 func TestPlcConnectionCache_PingTimeout(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -526,8 +536,9 @@ func TestPlcConnectionCache_PingTimeout(t *testing.T) {
 // the connection due to a timeout in the ping operation. The second call should get a new connection in this
 // case.
 func TestPlcConnectionCache_SecondCallGetNewConnectionAfterPingTimeout(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -584,7 +595,7 @@ func TestPlcConnectionCache_SecondCallGetNewConnectionAfterPingTimeout(t *testin
 	// This should be quite equal to the serial case as the connections are requested serially.
 	assert.NotNil(t, cache.GetTracer(), "Tracer should be available")
 	traces := cache.GetTracer().GetTraces()
-	assert.Equal(t, 5, len(traces), "Unexpected number of trace entries")
+	require.Equal(t, 5, len(traces), "Unexpected number of trace entries")
 	// First is needs to create a new container for this connection
 	assert.Equal(t, "create new cached connection", traces[0].Message, "Unexpected message")
 	// Then it gets a lease for the connection
@@ -600,8 +611,9 @@ func TestPlcConnectionCache_SecondCallGetNewConnectionAfterPingTimeout(t *testin
 // In this test the first client requests a connection, but doesn't listen on the response-channel
 // This shouldn't block the connection cache.
 func TestPlcConnectionCache_FistReadGivesUpBeforeItGetsTheConnectionSoSecondOneTakesOver(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -641,8 +653,9 @@ func TestPlcConnectionCache_FistReadGivesUpBeforeItGetsTheConnectionSoSecondOneT
 }
 
 func TestPlcConnectionCache_SecondConnectionGivenUpWaiting(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	cache := plcConnectionCache{
 		driverManager: driverManager,
 		maxLeaseTime:  time.Second * 5,
@@ -710,8 +723,9 @@ func TestPlcConnectionCache_SecondConnectionGivenUpWaiting(t *testing.T) {
 }
 
 func TestPlcConnectionCache_MaximumWaitTimeReached(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
diff --git a/plc4go/pkg/api/cache/connectionContainer_test.go b/plc4go/pkg/api/cache/connectionContainer_test.go
index 863454eeae..8eb00592d1 100644
--- a/plc4go/pkg/api/cache/connectionContainer_test.go
+++ b/plc4go/pkg/api/cache/connectionContainer_test.go
@@ -215,11 +215,6 @@ func Test_connectionContainer_lease(t1 *testing.T) {
 		{
 			name: "lease fresh",
 			fields: fields{
-				driverManager: func() plc4go.PlcDriverManager {
-					driverManager := plc4go.NewPlcDriverManager()
-					driverManager.RegisterDriver(simulated.NewDriver())
-					return driverManager
-				}(),
 				connectionString: "simulated://1.2.3.4:42",
 				lock:             lock.NewCASMutex(),
 				queue:            []chan plc4go.PlcConnectionConnectResult{},
diff --git a/plc4go/pkg/api/cache/plcConnectionLease_test.go b/plc4go/pkg/api/cache/plcConnectionLease_test.go
index 47ee806358..e960a9012f 100644
--- a/plc4go/pkg/api/cache/plcConnectionLease_test.go
+++ b/plc4go/pkg/api/cache/plcConnectionLease_test.go
@@ -22,6 +22,9 @@ package cache
 import (
 	"github.com/apache/plc4x/plc4go/internal/simulated"
 	plc4go "github.com/apache/plc4x/plc4go/pkg/api"
+	"github.com/apache/plc4x/plc4go/pkg/api/config"
+	"github.com/apache/plc4x/plc4go/spi/options"
+	"github.com/apache/plc4x/plc4go/spi/testutils"
 	"github.com/stretchr/testify/assert"
 	"github.com/viney-shih/go-lock"
 	"testing"
@@ -29,8 +32,9 @@ import (
 )
 
 func TestLeasedPlcConnection_IsTraceEnabled(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -96,8 +100,9 @@ func TestLeasedPlcConnection_IsTraceEnabled(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_GetTracer(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -137,8 +142,9 @@ func TestLeasedPlcConnection_GetTracer(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_GetConnectionId(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -178,8 +184,9 @@ func TestLeasedPlcConnection_GetConnectionId(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_Connect(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -217,8 +224,9 @@ func TestLeasedPlcConnection_Connect(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_BlockingClose(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -257,8 +265,9 @@ func TestLeasedPlcConnection_BlockingClose(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_Close(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -297,8 +306,9 @@ func TestLeasedPlcConnection_Close(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_IsConnected(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -329,8 +339,9 @@ func TestLeasedPlcConnection_IsConnected(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_Ping(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -370,8 +381,9 @@ func TestLeasedPlcConnection_Ping(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_GetMetadata(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -415,8 +427,9 @@ func TestLeasedPlcConnection_GetMetadata(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_ReadRequestBuilder(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -457,8 +470,9 @@ func TestLeasedPlcConnection_ReadRequestBuilder(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_WriteRequestBuilder(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -499,8 +513,9 @@ func TestLeasedPlcConnection_WriteRequestBuilder(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_SubscriptionRequestBuilder(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -541,8 +556,9 @@ func TestLeasedPlcConnection_SubscriptionRequestBuilder(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_UnsubscriptionRequestBuilder(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
@@ -591,8 +607,9 @@ func TestLeasedPlcConnection_UnsubscriptionRequestBuilder(t *testing.T) {
 }
 
 func TestLeasedPlcConnection_BrowseRequestBuilder(t *testing.T) {
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(simulated.NewDriver())
+	logger := testutils.ProduceTestingLogger(t)
+	driverManager := plc4go.NewPlcDriverManager(config.WithCustomLogger(logger))
+	driverManager.RegisterDriver(simulated.NewDriver(options.WithCustomLogger(logger)))
 	// Reduce the max lease time as this way we also reduce the max wait time.
 	cache := plcConnectionCache{
 		driverManager: driverManager,
diff --git a/plc4go/tests/drivers/tests/manual_bacnet_PcapTest_test.go b/plc4go/tests/drivers/tests/manual_bacnet_PcapTest_test.go
index 1255fd80c7..34e3cd2248 100644
--- a/plc4go/tests/drivers/tests/manual_bacnet_PcapTest_test.go
+++ b/plc4go/tests/drivers/tests/manual_bacnet_PcapTest_test.go
@@ -20,6 +20,8 @@
 package tests
 
 import (
+	"github.com/apache/plc4x/plc4go/spi/options"
+	"github.com/apache/plc4x/plc4go/spi/testutils"
 	"io"
 	"net/http"
 	"os"
@@ -53,9 +55,11 @@ func TestBacnetDriverWithPcap(t *testing.T) {
 			panic(err)
 		}
 	}
-	driverManager := plc4go.NewPlcDriverManager()
-	driverManager.RegisterDriver(bacnetip.NewDriver())
-	driverManager.(spi.TransportAware).RegisterTransport(pcap.NewTransport())
+	logger := testutils.ProduceTestingLogger(t)
+	withCustomLogger := options.WithCustomLogger(logger)
+	driverManager := plc4go.NewPlcDriverManager(withCustomLogger)
+	driverManager.RegisterDriver(bacnetip.NewDriver(withCustomLogger))
+	driverManager.(spi.TransportAware).RegisterTransport(pcap.NewTransport(withCustomLogger))
 	result := <-driverManager.GetConnection("bacnet-ip:pcap://" + file + "?transport-type=udp&speed-factor=0")
 	if result.GetErr() != nil {
 		panic(result.GetErr())