Skip to content

Commit

Permalink
tests: Add stats metadata validation to write_two_non_adjacent_range_…
Browse files Browse the repository at this point in the history
…tombstones

Signed-off-by: Vladimir Krivopalov <vladimir@scylladb.com>
  • Loading branch information
vkrivopalov committed Dec 7, 2018
1 parent d07ab3b commit dcd639b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
10 changes: 6 additions & 4 deletions tests/sstable_3_x_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4312,7 +4312,7 @@ SEASTAR_THREAD_TEST_CASE(test_write_two_non_adjacent_range_tombstones) {

// DELETE FROM two_non_adjacent_range_tombstones USING TIMESTAMP 1525385507816568 WHERE pk = 0 AND ck1 = 'aaa' AND ck2 < 'bbb';
{
gc_clock::time_point tp = gc_clock::time_point{} + gc_clock::duration{1529535128};
gc_clock::time_point tp = gc_clock::time_point{} + gc_clock::duration{1544094668};
tombstone tomb{ts, tp};
range_tombstone rt{clustering_key_prefix::from_single_value(*s, bytes("aaa")),
bound_kind::incl_start,
Expand All @@ -4322,9 +4322,9 @@ SEASTAR_THREAD_TEST_CASE(test_write_two_non_adjacent_range_tombstones) {
}
ts += 10;

// DELETE FROM range_tombstone_same_end_with_row USING TIMESTAMP 1525385507816568 WHERE pk = 0 AND ck1 = 'aaa' AND ck2 <= 'bbb';
// DELETE FROM two_non_adjacent_range_tombstones USING TIMESTAMP 1525385507816578 WHERE pk = 0 AND ck1 = 'aaa' AND ck2 > 'bbb';
{
gc_clock::time_point tp = gc_clock::time_point{} + gc_clock::duration{1529535139};
gc_clock::time_point tp = gc_clock::time_point{} + gc_clock::duration{1544094676};
tombstone tomb{ts, tp};
range_tombstone rt{clustering_key_prefix::from_deeply_exploded(*s, {"aaa", "bbb"}),
bound_kind::excl_start,
Expand All @@ -4336,7 +4336,9 @@ SEASTAR_THREAD_TEST_CASE(test_write_two_non_adjacent_range_tombstones) {
lw_shared_ptr<memtable> mt = make_lw_shared<memtable>(s);
mt->apply(mut);

write_and_compare_sstables(s, mt, table_name);
tmpdir tmp = write_and_compare_sstables(s, mt, table_name);
auto written_sst = validate_read(s, tmp.path, {mut});
validate_stats_metadata(s, written_sst, table_name);
}

// The resulting files are supposed to be identical to the files
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2224806029
3201032503
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Data.db
Digest.crc32
Index.db
TOC.txt
Filter.db
Statistics.db

0 comments on commit dcd639b

Please sign in to comment.