Improve `testSubprocessWithStdinInput` system test output
To quote @mdavis:
It would be more informative if we reversed the order of the ASSERTs:
TEST(SubProcessHelper, testSubprocessWithStdinInput) {
std::string stdinInput = "{\"integer_number\":42,\"str\":\"forty two\",\"double_number\":42.000000}";
cta::threading::SubProcess sp2("tee", std::list<std::string>({"tee"}),stdinInput);
sp2.wait();
ASSERT_EQ(stdinInput, sp2.stdout());
ASSERT_EQ(0, sp2.exitValue());
ASSERT_EQ("", sp2.stderr());
}
We should check exitValue is zero first, because if that test fails, the previous one certainly won't pass. Even better would be to check stderr first, as then you get the actual error message.
This test seems to be failing sporadically; improving the error message should give us additional information on this