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 2022/08/15 11:03:51 UTC

[plc4x] branch develop updated: test(plc4go/simulated): set context for simulated

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 576951d31 test(plc4go/simulated): set context for simulated
576951d31 is described below

commit 576951d31d02490c1ea5103ccef17bfa78c56108
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Aug 15 13:03:10 2022 +0200

    test(plc4go/simulated): set context for simulated
---
 plc4go/internal/simulated/Reader_test.go | 3 ++-
 plc4go/internal/simulated/Writer_test.go | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/plc4go/internal/simulated/Reader_test.go b/plc4go/internal/simulated/Reader_test.go
index 3af1cf90d..f5331b627 100644
--- a/plc4go/internal/simulated/Reader_test.go
+++ b/plc4go/internal/simulated/Reader_test.go
@@ -20,6 +20,7 @@
 package simulated
 
 import (
+	"context"
 	s7 "github.com/apache/plc4x/plc4go/internal/s7"
 	"github.com/apache/plc4x/plc4go/pkg/api/model"
 	"github.com/apache/plc4x/plc4go/pkg/api/values"
@@ -161,7 +162,7 @@ func TestReader_Read(t *testing.T) {
 			r := NewReader(tt.fields.device, tt.fields.options, nil)
 			readRequest := model3.NewDefaultPlcReadRequest(tt.args.fields, tt.args.fieldNames, r, nil)
 			timeBeforeReadRequest := time.Now()
-			readResponseChannel := r.Read(nil, readRequest)
+			readResponseChannel := r.Read(context.TODO(), readRequest)
 			select {
 			case readResponse := <-readResponseChannel:
 				timeAfterReadRequest := time.Now()
diff --git a/plc4go/internal/simulated/Writer_test.go b/plc4go/internal/simulated/Writer_test.go
index 55494c2dc..9291b801c 100644
--- a/plc4go/internal/simulated/Writer_test.go
+++ b/plc4go/internal/simulated/Writer_test.go
@@ -20,6 +20,7 @@
 package simulated
 
 import (
+	"context"
 	s7 "github.com/apache/plc4x/plc4go/internal/s7"
 	"github.com/apache/plc4x/plc4go/pkg/api/model"
 	"github.com/apache/plc4x/plc4go/pkg/api/values"
@@ -173,7 +174,7 @@ func TestWriter_Write(t *testing.T) {
 			w := NewWriter(tt.fields.device, tt.fields.options, nil)
 			writeRequest := model3.NewDefaultPlcWriteRequest(tt.args.fields, tt.args.fieldNames, tt.args.values, w, nil)
 			timeBeforeWriteRequest := time.Now()
-			writeResponseChannel := w.Write(nil, writeRequest)
+			writeResponseChannel := w.Write(context.TODO(), writeRequest)
 			select {
 			case writeResponse := <-writeResponseChannel:
 				timeAfterWriteRequest := time.Now()