Centralize test teardown: drop all tables in db fixture after each test#443
Centralize test teardown: drop all tables in db fixture after each test#443
db fixture after each test#443Conversation
|
@copilot would it make sense to rebase this on any of the branches? |
…recated APIs Agent-Logs-Url: https://github.com/pudo/dataset/sessions/d86834b1-5913-47e6-b163-8d9f21fe5163 Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
This branch is already based directly on Looking at the other branches:
The most useful thing to cherry-pick from |
|
@copilot Yes let's adopt that test infra. |
|
@copilot and let's keep the transaction semantics the same as on the master branch. |
|
@copilot looks like we're getting deadlocked on the ci/cd tests. |
…d add is_mysql Agent-Logs-Url: https://github.com/pudo/dataset/sessions/2e993987-d9db-4109-a8ec-12e59b67e9e9 Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
Done in c664c5a. The changes mirror what
Two small adaptations from the
All 59 tests pass. |
|
@copilot deadlocked on Postgres tests. |
Agent-Logs-Url: https://github.com/pudo/dataset/sessions/10dbad33-a37f-4f13-be1d-79390f0e0a77 Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
Done in 116b20f.
Fixed in 116b20f. Added |
|
@copilot still getting stuck. This may be a threading thing? Before we try and fix it can you make changes to the gh actions configs for Postgres and MySQL to time out deadlocks more quickly so we can properly capture test failures? |
Agent-Logs-Url: https://github.com/pudo/dataset/sessions/f047990b-01cb-46bb-bada-087da67aae5b Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
…ckly Agent-Logs-Url: https://github.com/pudo/dataset/sessions/b719997b-4380-4929-b788-805940e4785e Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pudo/dataset/sessions/cd7a235b-1e7f-454e-9b42-895cf1b88ec1 Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
All the The |
Agent-Logs-Url: https://github.com/pudo/dataset/sessions/e1db07d0-9536-4021-91b4-dcd961350cbc Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
… test semantics Agent-Logs-Url: https://github.com/pudo/dataset/sessions/fa736926-2cd6-47c6-ac88-f000b3581a44 Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
db fixture; restore simple test semantics
…ansactions Agent-Logs-Url: https://github.com/pudo/dataset/sessions/2148a605-0a64-4edc-ba14-c5644a9221cd Co-authored-by: pudo <41628+pudo@users.noreply.github.com>
db fixture; restore simple test semanticsdb fixture after each test
Ad-hoc
drop()/delete()calls scattered across individual tests made cleanup inconsistent and coupled tests to leftover state. The fix moves all cleanup into thedbfixture teardown and restores the simple test semantics from116b20f.Changes
conftest.py—dbfixture: drops all tables after each test via a teardown loop; rollbacks first to clear any aborted Postgres transactions (e.g. fromtest_invalid_values):conftest.py—tablefixture: removeddelete()preamble — teardown guarantees a clean slate, so the fixture just insertsTEST_DATA.test_database.py: removed per-testdelete()calls; restoredinsert()overupsert()in schema tests; restoreddata["id"] = 1intest_table_cache_updates(id sequence reliably starts at 1 on a fresh table).test_table.py: removeddelete()preambles fromtest_upsert_single_column,test_upsert_id,test_cased_column_names; restored hard-codedid=1/2/3intest_update_many,test_chunked_update,test_upsert_many.Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.