Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests defer database cleanup without invoking #274

Merged
merged 1 commit into from
Nov 27, 2020
Merged

Conversation

iand
Copy link
Contributor

@iand iand commented Nov 27, 2020

A recent refactoring wrapped the deferred database cleanups in an error assertion but defer evaluates arguments at the call site so this was invoking the cleanup function immediately.

@iand iand requested a review from alanshaw November 27, 2020 15:04
@alanshaw
Copy link
Member

I'm getting a bunch of errors running this:

VISOR_TEST_DB="postgres://alan@localhost/visor_test?sslmode=disable" go test ./storage/...
--- FAIL: TestMarkTipSetComplete (0.01s)
    sql_test.go:1057: 
                Error Trace:    sql_test.go:155
                                                        sql_test.go:1057
                Error:          Received unexpected error:
                                ERROR #42P01 relation "visor_processing_tipsets" does not exist
                Test:           TestMarkTipSetComplete
                Messages:       truncating visor_processing_tipsets

@iand iand merged commit 7bd1d81 into master Nov 27, 2020
@iand iand deleted the iand/fix-db-tests branch November 27, 2020 16:51
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