Closed MaximilienNaveau closed 5 years ago
this means most likely that the thread which reads from the timeseries https://github.com/machines-in-motion/real_time_tools/blob/master/tests/threadsafe_timeseries_test.cpp#L23 is too slow.
i am a bit surprised this happens (even on a non-realtime machine), since the other thread https://github.com/machines-in-motion/real_time_tools/blob/master/tests/threadsafe_timeseries_test.cpp#L117 waits at each iteration, and there is a buffer of 100 in the timeseries https://github.com/machines-in-motion/real_time_tools/blob/master/tests/threadsafe_timeseries_test.cpp#L128.
also, it is weird that this happens now after your changes (they looked ok to me). did you run the tests before and after the changes you made?
You actually start the reader before the publisher no?
yes, so it seems like the readers for some reason cannot keep up with the publisher
Ok. This error appear only in the docker in Bamboo. On my computer unit-tests when fine before and after my modifications.
Ok, I think the error comes from the fact that you used global variables and that they where not re-initialized between the 2 tests.
i don't see what you mean, at the beginning of each test the inputs are initialized and the timeseries is initialized, right?
Solution: to the problem, increase the sleeping duration in the slow thread
During the continuous build we have these kind of issues (see below). Anyone has an idea where this comes from?
error 23-Sep-2019 17:04:49 terminate called after throwing an instance of 'std::invalid_argument'
error 23-Sep-2019 17:04:49 what(): you tried to access timeseries element which is too old.