Problem
SolidSyslogStreamDefinition.h requires a Stream implementation to close internally on a failed Send and before returning a negative Read, so the caller can reopen and store-and-forward can replay.
The two integration-test transports — Tests/MbedTlsIntegration/SocketStream.c and Tests/OpenSslIntegration/BioPairStream.c — do not do this. They are the transports the TLS integration tests run over, so the tests exercise the adapter against a peer that does not behave as the contract says a Stream behaves.
Surfaced by a CodeRabbit comment on PR #711.
Why it is worth doing
Not a product defect: these are test doubles and nothing ships them. It matters because they sit underneath contract tests. A double that is more forgiving than the contract can hide a reconnect path that would misbehave against a conforming one, which is the failure mode these tests exist to catch.
Options
- Make both doubles conform — close on failed
Send and before a negative Read. Preferred; it is a few lines each and makes the test peer honest.
- Leave them and state in each file that the double is deliberately permissive and which clauses it does not implement, so the next reader does not mistake it for a reference.
Option 1 unless it turns out the tests depend on the permissive behaviour, in which case option 2 with the reason recorded.
Acceptance criteria
Problem
SolidSyslogStreamDefinition.hrequires a Stream implementation to close internally on a failedSendand before returning a negativeRead, so the caller can reopen and store-and-forward can replay.The two integration-test transports —
Tests/MbedTlsIntegration/SocketStream.candTests/OpenSslIntegration/BioPairStream.c— do not do this. They are the transports the TLS integration tests run over, so the tests exercise the adapter against a peer that does not behave as the contract says a Stream behaves.Surfaced by a CodeRabbit comment on PR #711.
Why it is worth doing
Not a product defect: these are test doubles and nothing ships them. It matters because they sit underneath contract tests. A double that is more forgiving than the contract can hide a reconnect path that would misbehave against a conforming one, which is the failure mode these tests exist to catch.
Options
Sendand before a negativeRead. Preferred; it is a few lines each and makes the test peer honest.Option 1 unless it turns out the tests depend on the permissive behaviour, in which case option 2 with the reason recorded.
Acceptance criteria