Skip to content

Commit

Permalink
storage/tests: test with default model::offset value
Browse files Browse the repository at this point in the history
This comparison has richer semantic meaning in this context.

(cherry picked from commit 0cbdb4e)
  • Loading branch information
nvartolomei authored and mmaslankaprv committed Apr 16, 2024
1 parent 3327362 commit c33f931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/v/storage/tests/storage_e2e_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2518,7 +2518,7 @@ FIXTURE_TEST(read_write_truncate, storage_test_fixture) {
[&] { return cnt > max; },
[&log, &log_mutex] {
auto offset = log->offsets();
if (offset.dirty_offset <= model::offset(0)) {
if (offset.dirty_offset == model::offset{}) {
return ss::now();
}
return log_mutex.with([&log] {
Expand Down Expand Up @@ -2610,7 +2610,7 @@ FIXTURE_TEST(write_truncate_compact, storage_test_fixture) {
[&] { return done; },
[&log, &log_mutex] {
auto offset = log->offsets();
if (offset.dirty_offset <= model::offset(0)) {
if (offset.dirty_offset == model::offset{}) {
return ss::now();
}
return log_mutex.with([&log] {
Expand Down Expand Up @@ -3441,7 +3441,7 @@ FIXTURE_TEST(issue_8091, storage_test_fixture) {
[&] { return cnt > max; },
[&log, &log_mutex, &last_truncate] {
auto offset = log->offsets();
if (offset.dirty_offset <= model::offset(0)) {
if (offset.dirty_offset == model::offset{}) {
return ss::now();
}
return log_mutex
Expand Down

0 comments on commit c33f931

Please sign in to comment.