Skip to content

Commit d63289b

Browse files
authored
Merge pull request #1547 from lightninglabs/unit-race-flake
tapdb: fix unit race flakes
2 parents 97c53cc + 447b5c3 commit d63289b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ flake-unit-race:
232232
@$(call print, "Flake hunting races in unit tests.")
233233
while [ $$? -eq 0 ]; do make unit-race nocache=1; done
234234

235+
flake-unit-race-trace:
236+
@$(call print, "Flake hunting races in unit tests.")
237+
while [ $$? -eq 0 ]; do make unit-race log='stdout trace' nocache=1; done
238+
235239
# =============
236240
# FUZZING
237241
# =============

make/testing_flags.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ endif
7474
# are provided, we default to "nolog" which will be silent.
7575
ifneq ($(log),)
7676
LOG_TAGS := ${log}
77+
TEST_FLAGS += -test.v
7778
else
7879
LOG_TAGS := nolog
7980
endif

tapdb/sqlerrors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func parseSqliteError(sqliteErr *sqlite.Error) error {
5555

5656
// A write operation could not continue because of a conflict within the
5757
// same database connection.
58-
case sqlite3.SQLITE_LOCKED:
58+
case sqlite3.SQLITE_LOCKED, sqlite3.SQLITE_BUSY_SNAPSHOT:
5959
return &ErrDeadlockError{
6060
DbError: sqliteErr,
6161
}

0 commit comments

Comments
 (0)