mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
* Add test coverage for executionplanner.go *ExecutionPlanner.mapper does not get tested in the case where its context gets cancelled. In order to make testing this possible, I've added a context argument to sql_test.MustQueryRow. If it's nil, MustQueryRow creates a context for itself just like it always has, but if a context is provided, it uses that. * Adds test coverage for ExecutionPlanner.mapper in executionplanner.go The case where the context gets cancelled mid-query is now covered. The test is timing-dependent - the cancel call has to happen after the query has been started but before it finishes, and in just the right part of MustRunQuery, in order to actually produce a context cancelled error, and not, say, a query cancelled error. May have to adjust timing if the current delays don't work in CI testing. * Addressed review notes -reordered arguments for MustRunQuery -moved MustRunQuery out of a goroutine, put the cancel in one |
||
|---|---|---|
| .. | ||
| parser | ||
| planner | ||
| test | ||
| errors.go | ||
| interfaces.go | ||
| main_test.go | ||
| sql_complex_test.go | ||
| sql_test.go | ||