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 ed7d7823f1 test(plc4go): fix test no properly shutdown
ed7d7823f1 is described below

commit ed7d7823f1c256aa8be06c9f27e74129a3432e84
Author: Sebastian Rühl <[email protected]>
AuthorDate: Fri Nov 14 14:26:16 2025 +0100

    test(plc4go): fix test no properly shutdown
---
 plc4go/spi/default/DefaultCodec_test.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/plc4go/spi/default/DefaultCodec_test.go 
b/plc4go/spi/default/DefaultCodec_test.go
index 18d5db00c3..755f1f4e09 100644
--- a/plc4go/spi/default/DefaultCodec_test.go
+++ b/plc4go/spi/default/DefaultCodec_test.go
@@ -371,6 +371,9 @@ func Test_defaultCodec_Connect(t *testing.T) {
        }{
                {
                        name: "connect it",
+                       args: args{
+                               ctx: testutils.TestContext(t),
+                       },
                        setup: func(t *testing.T, fields *fields, args *args) {
                                instance := NewMockTransportInstance(t)
                                instance.EXPECT().IsConnected().Return(true)
@@ -380,6 +383,9 @@ func Test_defaultCodec_Connect(t *testing.T) {
                },
                {
                        name: "connect it (fails)",
+                       args: args{
+                               ctx: testutils.TestContext(t),
+                       },
                        setup: func(t *testing.T, fields *fields, args *args) {
                                instance := NewMockTransportInstance(t)
                                expect := instance.EXPECT()
@@ -391,6 +397,9 @@ func Test_defaultCodec_Connect(t *testing.T) {
                },
                {
                        name: "connect it already connected",
+                       args: args{
+                               ctx: testutils.TestContext(t),
+                       },
                        setup: func(t *testing.T, fields *fields, args *args) {
                                instance := NewMockTransportInstance(t)
                                instance.EXPECT().IsConnected().Return(true)
@@ -415,6 +424,8 @@ func Test_defaultCodec_Connect(t *testing.T) {
                                log:                           
testutils.ProduceTestingLogger(t),
                        }
                        tt.wantErr(t, m.Connect(tt.args.ctx), 
fmt.Sprintf("Connect(%v)", tt.args.ctx))
+                       m.running.Store(false)
+                       m.wg.Wait()
                })
        }
 }

Reply via email to