khaiql / dbcleaner Goto Github PK
View Code? Open in Web Editor NEWClean database for testing, inspired by database_cleaner for Ruby
License: MIT License
Clean database for testing, inspired by database_cleaner for Ruby
License: MIT License
I started seeing below error all of a sudden when I added schema_name in front of the table it was working fine.
- FAIL: TestFunctionalTestSuite/TestSendNOAA (100.04s)
suite.go:62: test panicked: failed to ACQUIRE tables [notice] after 5 times
goroutine 10 [running]:
runtime/debug.Stack(0xc0006e1c78, 0x48ced20, 0xc0006321f0)
/usr/local/go1.12.7.darwin-amd64/src/runtime/debug/stack.go:24 +0x9d
github.com/stretchr/testify/suite.failOnPanic(0xc00020c000)
/Users/bvennapureddy/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:62 +0x57
panic(0x48ced20, 0xc0006321f0)
/usr/local/go1.12.7.darwin-amd64/src/runtime/panic.go:522 +0x1b5
gopkg.in/khaiql/dbcleaner%2ev2.(*cleanerImpl).Acquire(0xc000033700, 0xc00022a0c0, 0x4, 0x4)
/Users/bvennapureddy/go/pkg/mod/gopkg.in/khaiql/[email protected]/dbcleaner.go:160 +0x586
git.enova.com/services/customer_notices.(*FunctionalTestSuite).SetupTest(0xc000258f20)
/Users/bvennapureddy/customer_notices/init_test.go:123 +0x126
github.com/stretchr/testify/suite.Run.func2(0xc00020c000)
/Users/bvennapureddy/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:119 +0x3e7
testing.tRunner(0xc00020c000, 0xc000191980)
/usr/local/go1.12.7.darwin-amd64/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
/usr/local/go1.12.7.darwin-amd64/src/testing/testing.go:916 +0x35a
go version issue
$ go version
go version go1.8.1 darwin/amd64
$ go test -v
vendor/gopkg.in/khaiql/dbcleaner.v2/dbcleaner.go:44: undefined: sync.Map
The output printed out by the v2 version of dbcleaner is polluting my output for tests and love a way to disable it.
Either it being a way to passing in a NoOP destination/logger, or just a switch that I can flip to disable it entirely.
Example Output:
[Postgres] Executing command TRUNCATE TABLE countries CASCADE
[Postgres] Executing command TRUNCATE TABLE addresses CASCADE
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.