Skip to content

Commit

Permalink
Add some static data to the store dump test suite (#6167)
Browse files Browse the repository at this point in the history
I cannot reproduce #6094, see
#6094 (comment):
> I actually cannot repro this. I tried:
> - Saving entire timeline, `0.15.1`
> - Saving time selection, `0.15.1`
> - Saving entire timeline, `main`
> - Saving time selection, `main`

For now the best I can think of is to add some static data to the test
suite and call it a day...

~Marking as do not merge until the situation is clarified.~

- Closes #6094
  • Loading branch information
teh-cmc committed Apr 30, 2024
1 parent b7a72cb commit c672f98
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions crates/re_data_store/tests/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use re_data_store::{
};
use re_log_types::{
build_frame_nr, build_log_time, example_components::MyIndex, DataRow, DataTable, EntityPath,
RowId, TableId,
RowId, TableId, TimePoint,
};
use re_types::datagen::{build_some_colors, build_some_positions2d};

Expand Down Expand Up @@ -269,6 +269,7 @@ fn data_store_dump_filtered_impl(store1: &mut DataStore, store2: &mut DataStore)
fn create_insert_table(entity_path: impl Into<EntityPath>) -> DataTable {
let entity_path = entity_path.into();

let timeless = TimePoint::default();
let frame1 = TimeInt::new_temporal(1);
let frame2 = TimeInt::new_temporal(2);
let frame3 = TimeInt::new_temporal(3);
Expand All @@ -282,7 +283,7 @@ fn create_insert_table(entity_path: impl Into<EntityPath>) -> DataTable {
let positions2 = build_some_positions2d(3);
let row2 = test_row!(entity_path @ [
build_frame_nr(frame2),
] => [instances1, positions2]);
] => [instances1, positions2.clone()]);

let positions3 = build_some_positions2d(10);
let row3 = test_row!(entity_path @ [
Expand All @@ -292,9 +293,11 @@ fn create_insert_table(entity_path: impl Into<EntityPath>) -> DataTable {
let colors4 = build_some_colors(5);
let row4 = test_row!(entity_path @ [
build_frame_nr(frame4),
] => [colors4]);
] => [colors4.clone()]);

let mut table = DataTable::from_rows(TableId::new(), [row1, row2, row3, row4]);
let row0 = test_row!(entity_path @ timeless => [positions2, colors4]);

let mut table = DataTable::from_rows(TableId::new(), [row0, row1, row2, row3, row4]);
table.compute_all_size_bytes();

table
Expand Down

0 comments on commit c672f98

Please sign in to comment.