Skip to content

remove uses of the new dbpool in dbtest

Administrator requested to merge cc/remove-dbpool-use into main

Created by: camdencheek

This removes references to dbtest.NewFastTx because they are currently causing some random failures. I don't immediately have the time to debug these, so I'm just disabling them to avoid blocking other engineers until I get the chance to stress test the new pool a bit more.

The failures for reference:

➜  database git:(main) go test -test.run '^TestOrgs'
--- FAIL: TestOrgs_GetByID (0.02s)
    orgs_test.go:134: error getting pool: sql: transaction has already been committed or rolled back
--- FAIL: TestOrgs_Delete (0.02s)
    orgs_test.go:69: error getting pool: sql: transaction has already been committed or rolled back
--- FAIL: TestOrgs_Count (0.02s)
    orgs_test.go:42: error getting pool: sql: transaction has already been committed or rolled back
--- FAIL: TestOrgs_ValidNames (0.02s)
    orgs_test.go:20: error getting pool: sql: transaction has already been committed or rolled back
--- FAIL: TestOrgs_GetOrgsWithRepositoriesByUserID (0.02s)
    orgs_test.go:186: error getting pool: sql: transaction has already been committed or rolled back
FAIL
exit status 1
FAIL	github.com/sourcegraph/sourcegraph/internal/database	0.265s

Merge request reports

Loading