Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@
@ResourceLock(value = "SEARCH_INDEX_APP", mode = ResourceAccessMode.READ_WRITE)
class ReindexStopUnderLoadIT {

private static final int SEED_TABLES = SizeFactor.scale(10_000);
private static final int FULL_SIZE_TABLES = 10_000;
private static final int SEED_TABLES = SizeFactor.scale(FULL_SIZE_TABLES);
private static final int COLUMNS_PER_TABLE = 3;
private static final int LOAD_WORKERS = 16;
private static final Duration WARMUP = Duration.ofSeconds(8);

// The stop has to reach a reindex that is still running, and at the fast tier's 0.05 factor
// the whole run takes about 6 s. So the warm-up scales with the cohort, with a 2 s floor that
// gives the job time to start.
private static final Duration WARMUP =
Duration.ofMillis(Math.max(2_000L, 8_000L * SEED_TABLES / FULL_SIZE_TABLES));
Comment on lines +56 to +57

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stop can miss active work

If a smaller cohort or faster server finishes indexing before WARMUP ends, this test still passes without stopping active work. waitForRunStartedSince only checks the run's timestamp, and the final assertion accepts normal completion. Scaling the delay improves the timing but does not close this coverage gap.

Wait for indexing progress while the run is still active, then send stop immediately and check that it stopped.


private static final Duration STOP_TIMEOUT = Duration.ofSeconds(30);
private static final Duration POST_STOP_QUIESCE = Duration.ofSeconds(5);

Expand Down
Loading