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/05/17 14:36:41 UTC
[plc4x] branch develop updated: test(plc4go/cbus): log failing to accept a inbound connection
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 ef1c459fb1 test(plc4go/cbus): log failing to accept a inbound connection
ef1c459fb1 is described below
commit ef1c459fb11852658f7aa89e264c32320c03f5df
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Wed May 17 16:36:32 2023 +0200
test(plc4go/cbus): log failing to accept a inbound connection
- Test asserting data should fail anyway
---
plc4go/internal/cbus/Discoverer_test.go | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/plc4go/internal/cbus/Discoverer_test.go b/plc4go/internal/cbus/Discoverer_test.go
index 8c7949d1fc..d121dbb8fd 100644
--- a/plc4go/internal/cbus/Discoverer_test.go
+++ b/plc4go/internal/cbus/Discoverer_test.go
@@ -244,13 +244,12 @@ func TestDiscoverer_createTransportInstanceDispatcher(t *testing.T) {
cBusPort: func() uint16 {
listen, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
- t.Error(err)
- t.FailNow()
+ t.Fatal(err)
}
go func() {
conn, err := listen.Accept()
if err != nil {
- t.Error(err)
+ t.Log(err)
return
}
write, err := conn.Write([]byte("x.890050435F434E49454422\r\n"))
@@ -267,13 +266,11 @@ func TestDiscoverer_createTransportInstanceDispatcher(t *testing.T) {
})
parse, err := url.Parse("tcp://" + listen.Addr().String())
if err != nil {
- t.Error(err)
- t.FailNow()
+ t.Fatal(err)
}
port, err := strconv.ParseUint(parse.Port(), 10, 16)
if err != nil {
- t.Error(err)
- t.FailNow()
+ t.Fatal(err)
}
return uint16(port)
}(),