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 e5211e4a1df9b66da3664c6b2b28a79d4a19b238 Author: Sebastian Rühl <[email protected]> AuthorDate: Fri Nov 14 14:30:52 2025 +0100 test(plc4go): fix cast panic --- plc4go/internal/cbus/MessageCodec_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plc4go/internal/cbus/MessageCodec_test.go b/plc4go/internal/cbus/MessageCodec_test.go index bbfcd40e6c..86a33816e9 100644 --- a/plc4go/internal/cbus/MessageCodec_test.go +++ b/plc4go/internal/cbus/MessageCodec_test.go @@ -679,6 +679,7 @@ func TestMessageCodec_Receive_Delayed_Response(t *testing.T) { require.NotNil(t, msg) // The message should have a confirmation with an alpha + require.Implements(t, (*readWriteModel.CBusMessageToClient)(nil), msg) assert.True(t, msg.(readWriteModel.CBusMessageToClient).GetReply().GetIsAlpha()) }) t.Run("data after 6 times", func(t *testing.T) { @@ -725,7 +726,9 @@ func TestMessageCodec_Receive_Delayed_Response(t *testing.T) { assert.NotNil(t, msg) // The message should have a confirmation with an alpha - assert.True(t, msg.(readWriteModel.CBusMessageToClient).GetReply().GetIsAlpha()) + require.Implements(t, (*readWriteModel.CBusMessageToClient)(nil), msg) + cBusMessageToClient := msg.(readWriteModel.CBusMessageToClient) + assert.True(t, cBusMessageToClient.GetReply().GetIsAlpha()) }) t.Run("data after 15 times", func(t *testing.T) { _options := testutils.EnrichOptionsWithOptionsForTesting(t) @@ -776,6 +779,7 @@ func TestMessageCodec_Receive_Delayed_Response(t *testing.T) { assert.NotNil(t, msg) // The message should have a confirmation without an alpha + require.Implements(t, (*readWriteModel.CBusMessageToClient)(nil), msg) assert.False(t, msg.(readWriteModel.CBusMessageToClient).GetReply().GetIsAlpha()) }) }
