Open shashanktomar opened 8 years ago
goconvey
logs debug output to the terminal. Could you post that output?
Thanks for reply @mdwhatcott
Here are the logs from goconvey command run.
2016/02/12 06:58:30 integration.go:120: File system state modified, publishing current folders... 2910410872 2910410892
2016/02/12 06:58:30 goconvey.go:111: Received request from watcher to execute tests...
2016/02/12 06:58:30 executor.go:69: Executor status: 'executing'
2016/02/12 06:58:30 coordinator.go:46: Executing concurrent tests: .
2016/02/12 06:58:31 parser.go:24: [passed]: .
2016/02/12 06:58:31 executor.go:69: Executor status: 'idle'
This looks normal to me. One more observation is, if i quit goconvey process and run it again, everything runs fine for the first time, but on subsequent invocation by saving files, db calls are made twice.
Are you facing the same issue if you run the code above?
Hi Folks,
Any update on this?
Nothing yet. You might try starting a fresh test suite that is as simple as possible, then slowly add stuff until you see the double execution.
What if you move the 'clear' inside the first Convey function?
+1 Have observed the exact same behavior trying to test db related stuff.
I am facing a very strange issue. I have written the sample code to explain it. Here is my simple
mgo
interaction code which caninsert
,find
andremove
a struct from database.And here are tests written using goconvey.
Everything pass and life is joyful and happy. But here comes the tricky part. I run these tests by calling
goconvey
in my test directory. When the tests are run, either explicitly from UI or by saving the file, my mongodb interactions happen twice i.e. there are two connections running in parallel which callinsert
,find
andremove
twice. Here is the log dumped by mongo.In this logs the queries by two connections are sequential, but they are concurrent in most of the cases overlapping with each other. Now if i run the same tests by calling
go test
in test folder, the interactions happen only once. Here is the attached log.This triggers a huge problem if the number of tests are large. Tests start failing randomly because of common concurrency issues. Like insertion happen twice and then test for find fails because length is 2.
Just invoke the local mongo server and try to run this code, its a very strange behaviour. Am i missing something about goconvey command?