Creates a dataset on its OWN TimeDomain (mirroring FileLoader's one-domain-per- source) and writes scalar samples. The per-source domain is required because "align starts" / Timeline offsets are written to the domain — a default (id 0) domain carries no shiftable offset.
| 399 | // "align starts" / Timeline offsets are written to the domain — a default (id 0) |
| 400 | // domain carries no shiftable offset. |
| 401 | PJ::DatasetId addDataset( |
| 402 | PJ::SessionManager& session, std::string_view source, std::string_view topic, |
| 403 | std::vector<PJ::Timestamp> timestamps) { |
| 404 | auto domain = session.dataEngine().createTimeDomain(std::string(source)); |
| 405 | EXPECT_TRUE(domain.has_value()) << domain.error(); |
| 406 | auto dataset = session.dataEngine().createDataset( |
| 407 | PJ::DatasetDescriptor{.source_name = std::string(source), .time_domain_id = *domain}); |
| 408 | EXPECT_TRUE(dataset.has_value()) << dataset.error(); |
| 409 | writeScalarSamples(session, *dataset, topic, std::move(timestamps)); |
| 410 | return *dataset; |
| 411 | } |
| 412 | |
| 413 | TEST(SessionManagerTimeOffsetTest, DefaultsOffWithZeroOffset) { |
| 414 | PJ::SessionManager session; |
no test coverage detected