Replay log files without start times
We were trying to solve the timestamp problem for them unsuccessfully.
Turns out our solver isn't a bit fan of solving for min_time...
These times make no sense to have in our interpolation table, so just
don't solve for them.
Change-Id: Iac1fdfb75b83bb6f2c6417caaa436d44e7836365
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/logging/logger_test.cc b/aos/events/logging/logger_test.cc
index 6d45413..55bf687 100644
--- a/aos/events/logging/logger_test.cc
+++ b/aos/events/logging/logger_test.cc
@@ -2739,8 +2739,21 @@
EXPECT_TRUE(timestamp_file_count == 2u || timestamp_file_count == 4u);
- // TODO(austin): Finish reading it. We don't have a valid start time so
- // log_reader gets rather grumpy.
+ // Confirm that we can actually sort the resulting log and read it.
+ {
+ LogReader reader(SortParts(filenames));
+
+ SimulatedEventLoopFactory log_reader_factory(reader.configuration());
+ log_reader_factory.set_send_delay(chrono::microseconds(0));
+
+ // This sends out the fetched messages and advances time to the start of
+ // the log file.
+ reader.Register(&log_reader_factory);
+
+ log_reader_factory.Run();
+
+ reader.Deregister();
+ }
}
// Tests that we properly handle one direction of message_bridge being