test: fix tests
parent
9a45c0d05b
commit
65bfa4dd10
|
@ -1460,7 +1460,7 @@ mod tests {
|
||||||
|
|
||||||
// verify chunk size updated (chunk moved from closing to moving to moved)
|
// verify chunk size updated (chunk moved from closing to moving to moved)
|
||||||
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "mutable_buffer", 0).unwrap();
|
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "mutable_buffer", 0).unwrap();
|
||||||
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1630).unwrap();
|
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1616).unwrap();
|
||||||
|
|
||||||
db.write_chunk_to_object_store("1970-01-01T00", "cpu", 0, &Default::default())
|
db.write_chunk_to_object_store("1970-01-01T00", "cpu", 0, &Default::default())
|
||||||
.await
|
.await
|
||||||
|
@ -1480,7 +1480,7 @@ mod tests {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let expected_parquet_size = 759;
|
let expected_parquet_size = 759;
|
||||||
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1630).unwrap();
|
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1616).unwrap();
|
||||||
// now also in OS
|
// now also in OS
|
||||||
catalog_chunk_size_bytes_metric_eq(
|
catalog_chunk_size_bytes_metric_eq(
|
||||||
&test_db.metric_registry,
|
&test_db.metric_registry,
|
||||||
|
@ -1650,7 +1650,7 @@ mod tests {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// verify chunk size updated (chunk moved from moved to writing to written)
|
// verify chunk size updated (chunk moved from moved to writing to written)
|
||||||
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1630).unwrap();
|
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1616).unwrap();
|
||||||
|
|
||||||
// drop, the chunk from the read buffer
|
// drop, the chunk from the read buffer
|
||||||
db.drop_chunk(partition_key, "cpu", mb_chunk.id()).unwrap();
|
db.drop_chunk(partition_key, "cpu", mb_chunk.id()).unwrap();
|
||||||
|
@ -1660,7 +1660,7 @@ mod tests {
|
||||||
);
|
);
|
||||||
|
|
||||||
// verify size is reported until chunk dropped
|
// verify size is reported until chunk dropped
|
||||||
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1630).unwrap();
|
catalog_chunk_size_bytes_metric_eq(&test_db.metric_registry, "read_buffer", 1616).unwrap();
|
||||||
std::mem::drop(rb_chunk);
|
std::mem::drop(rb_chunk);
|
||||||
|
|
||||||
// verify chunk size updated (chunk dropped from moved state)
|
// verify chunk size updated (chunk dropped from moved state)
|
||||||
|
@ -1733,7 +1733,7 @@ mod tests {
|
||||||
("svr_id", "1"),
|
("svr_id", "1"),
|
||||||
])
|
])
|
||||||
.histogram()
|
.histogram()
|
||||||
.sample_sum_eq(3231.0)
|
.sample_sum_eq(3189.0)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let rb = collect_read_filter(&rb_chunk).await;
|
let rb = collect_read_filter(&rb_chunk).await;
|
||||||
|
@ -1835,7 +1835,7 @@ mod tests {
|
||||||
("svr_id", "10"),
|
("svr_id", "10"),
|
||||||
])
|
])
|
||||||
.histogram()
|
.histogram()
|
||||||
.sample_sum_eq(2389.0)
|
.sample_sum_eq(2375.0)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// it should be the same chunk!
|
// it should be the same chunk!
|
||||||
|
@ -1943,7 +1943,7 @@ mod tests {
|
||||||
("svr_id", "10"),
|
("svr_id", "10"),
|
||||||
])
|
])
|
||||||
.histogram()
|
.histogram()
|
||||||
.sample_sum_eq(2389.0)
|
.sample_sum_eq(2375.0)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Unload RB chunk but keep it in OS
|
// Unload RB chunk but keep it in OS
|
||||||
|
@ -2343,7 +2343,7 @@ mod tests {
|
||||||
Arc::from("cpu"),
|
Arc::from("cpu"),
|
||||||
0,
|
0,
|
||||||
ChunkStorage::ReadBufferAndObjectStore,
|
ChunkStorage::ReadBufferAndObjectStore,
|
||||||
2380, // size of RB and OS chunks
|
2373, // size of RB and OS chunks
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
ChunkSummary::new_without_timestamps(
|
ChunkSummary::new_without_timestamps(
|
||||||
|
@ -2394,7 +2394,7 @@ mod tests {
|
||||||
.memory()
|
.memory()
|
||||||
.read_buffer()
|
.read_buffer()
|
||||||
.get_total(),
|
.get_total(),
|
||||||
1621
|
1614
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
db.catalog.state().metrics().memory().parquet().get_total(),
|
db.catalog.state().metrics().memory().parquet().get_total(),
|
||||||
|
|
Loading…
Reference in New Issue