go-datadog-api icon indicating copy to clipboard operation
go-datadog-api copied to clipboard

Remove acceptance test flake

Open ojongerius opened this issue 7 years ago • 2 comments

Seen in https://travis-ci.org/zorkian/go-datadog-api/jobs/418580761 (Go 1.9):

--- PASS: TestDowntimeLinkedToMonitorCreateAndDelete (0.53s)
=== RUN   TestDowntimeUpdate
--- FAIL: TestDowntimeUpdate (0.32s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x670c93]
goroutine 134 [running]:
testing.tRunner.func1(0xc4200f61e0)
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/testing/testing.go:711 +0x2d2
panic(0x6d22c0, 0x8c4a70)
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/runtime/panic.go:491 +0x283
command-line-arguments.cleanUpDowntime(0xc4200f61e0, 0x1616ae41)
	/home/travis/gopath/src/github.com/zorkian/go-datadog-api/integration/downtime_test.go:127 +0xe3
command-line-arguments.TestDowntimeUpdate(0xc4200f61e0)
	/home/travis/gopath/src/github.com/zorkian/go-datadog-api/integration/downtime_test.go:70 +0x28a
testing.tRunner(0xc4200f61e0, 0x746d38)
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/testing/testing.go:746 +0xd0
created by testing.(*T).Run
	/home/travis/.gimme/versions/go1.9.linux.amd64/src/testing/testing.go:789 +0x2de
exit status 2
FAIL	command-line-arguments	15.287s
make: *** [testacc] Error 1

ojongerius avatar Aug 21 '18 08:08 ojongerius

this nilpo doesn't happen now 🍣 https://travis-ci.org/zorkian/go-datadog-api/builds/491342452

but it happens one before https://travis-ci.org/zorkian/go-datadog-api/jobs/491334221

dharada1 avatar Feb 11 '19 02:02 dharada1

We've got one other flake though:

=== RUN TestIntegrationGCPUpdate
--- FAIL: TestIntegrationGCPUpdate (6.38s)
integrations_test.go:422:
Error Trace: integrations_test.go:422
integrations_test.go:383
Error: Not equal:
expected: 0
actual : 1
Test: TestIntegrationGCPUpdate

I'm not able to reproduce this by running the test individually, smells like parallel builds are suffering from side effects by neighboring builds.

I might just create separate DD accounts for these builds so the tests are nice and contained.

ojongerius avatar Feb 20 '19 23:02 ojongerius