In daemon, write a log file to enable debugging. Shut down the write end of the socket in the daemon, to let the other end detect that we’re not sending anything else (they’ll get an EOF, instead of waiting indefinitely). Read from to the end of the socket, but with a timeout, so that we don’t wait indefinitely for the other end to close their write end. These changes make the tests using this helper be less flaky.
Signed-off-by: Lars Wirzenius liw@liw.fi
feat(adapter.rs):
Make error messages be more specific, to enable user to debug more effectively. Instead of a generic “message error”, for example, we now tell the user if it was a JSON parsing error, or request message write error.
Also change the unit tests to actually read the request message before writing response messages.
Make unit tests handle correctly different situations that they should deal as successful, and also write to stderr results from running an adapter before checking them, to allow unit test failures to be debugged better.
Signed-off-by: Lars Wirzenius liw@liw.fi
feat(broker.rs): log underlying errors when running an adapter fail
Also, in unit tests that run the adapter, read the request before sending responses.
Signed-off-by: Lars Wirzenius liw@liw.fi
tests(ci-broker.md): re-enable all subplot scenarios
They now pass 10,000 times in a row on my hardware.
Signed-off-by: Lars Wirzenius liw@liw.fi
In daemon, write a log file to enable debugging. Shut down the write end of the socket in the daemon, to let the other end detect that we’re not sending anything else (they’ll get an EOF, instead of waiting indefinitely). Read from to the end of the socket, but with a timeout, so that we don’t wait indefinitely for the other end to close their write end. These changes make the tests using this helper be less flaky.
Signed-off-by: Lars Wirzenius liw@liw.fi
feat(adapter.rs):
Make error messages be more specific, to enable user to debug more effectively. Instead of a generic “message error”, for example, we now tell the user if it was a JSON parsing error, or request message write error.
Also change the unit tests to actually read the request message before writing response messages.
Make unit tests handle correctly different situations that they should deal as successful, and also write to stderr results from running an adapter before checking them, to allow unit test failures to be debugged better.
Signed-off-by: Lars Wirzenius liw@liw.fi
feat(broker.rs): log underlying errors when running an adapter fail
Also, in unit tests that run the adapter, read the request before sending responses.
Signed-off-by: Lars Wirzenius liw@liw.fi
tests(ci-broker.md): re-enable all subplot scenarios
They now pass 10,000 times in a row on my hardware.
Signed-off-by: Lars Wirzenius liw@liw.fi