Skip to content

Conversation

@bgentry
Copy link
Contributor

@bgentry bgentry commented Jan 31, 2026

@brandur hit a point where I felt like this file is just too unwieldy. Instead of a giant 5000 line file, this splits them into smaller files grouped by entity. For job queries where we have many tests, break them into files by query type.

Let me know if you think this would be an improvement broadly. It's easy to tweak as it's a mostly AI-driven refactor. FWIW I also spun up a separate session and had it cross check every removed line to verify it was moved without being altered (other than setup details)—all good there. ✅

@bgentry bgentry requested a review from brandur January 31, 2026 21:21
@bgentry bgentry force-pushed the bgentry/split-driver-test branch from cb8347d to 5dad2d4 Compare January 31, 2026 21:47
Instead of a giant 5000 line file, split into smaller files grouped by
entity. For job queries where we have many tests, break them into files
by query type.
@bgentry bgentry force-pushed the bgentry/split-driver-test branch from 5dad2d4 to f64e602 Compare January 31, 2026 21:51
Comment on lines +106 to +118
t.Run("IndexThatDoesNotExistIgnore", func(t *testing.T) {
t.Parallel()

// Postgres runs the drop with `CONCURRENTLY` so this must use a full
// schema rather than a transaction block.
driver, schema := driverWithSchema(ctx, t, nil)

err := driver.GetExecutor().IndexDropIfExists(ctx, &riverdriver.IndexDropIfExistsParams{
Index: "does_not_exist",
Schema: schema,
})
require.NoError(t, err)
})
Copy link
Contributor Author

@bgentry bgentry Jan 31, 2026

Choose a reason for hiding this comment

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

@brandur hmm, this test was actually just an empty block before the split and Codex attempted to fix it. However it can't work in a tx as the other tests do because you can't run DROP INDEX CONCURRENTLY inside a transaction.

I filled it out using the same pattern as the above test to grab a full schema instead of txn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants