Check Unit-Test fails
The Unit tests seem to fail frequently. We should check why and solve it.
Description
Expected Behavior
WARNING: DATA RACE
Read at 0x00c0037a4043 by goroutine 41:
testing.(*common).logDepth()
/usr/lib/go/src/testing/testing.go:774 +0x4e4
testing.(*common).log()
/usr/lib/go/src/testing/testing.go:761 +0x6e
testing.(*common).Logf()
/usr/lib/go/src/testing/testing.go:807 +0x14
code.fbi.h-da.de/danet/gosdn/nucleus.TestChange_Confirm.func1.1()
/home/aps/Code/hda/mpse-gosdn/gosdn/nucleus/change_test.go:203 +0x8f
code.fbi.h-da.de/danet/gosdn/nucleus.stateManager.func1()
/home/aps/Code/hda/mpse-gosdn/gosdn/nucleus/change.go:129 +0x338
Previous write at 0x00c0037a4043 by goroutine 39:
testing.tRunner.func1()
/usr/lib/go/src/testing/testing.go:1246 +0x584
testing.tRunner()
/usr/lib/go/src/testing/testing.go:1265 +0x268
testing.(*T).Run·dwrap·21()
/usr/lib/go/src/testing/testing.go:1306 +0x47
Goroutine 41 (running) created at:
code.fbi.h-da.de/danet/gosdn/nucleus.stateManager()
/home/aps/Code/hda/mpse-gosdn/gosdn/nucleus/change.go:124 +0x250
code.fbi.h-da.de/danet/gosdn/nucleus.TestChange_Confirm.func1()
/home/aps/Code/hda/mpse-gosdn/gosdn/nucleus/change_test.go:207 +0x50a
testing.tRunner()
/usr/lib/go/src/testing/testing.go:1259 +0x22f
testing.(*T).Run·dwrap·21()
/usr/lib/go/src/testing/testing.go:1306 +0x47
Goroutine 39 (finished) created at:
testing.(*T).Run()
/usr/lib/go/src/testing/testing.go:1306 +0x726
testing.runTests.func1()
/usr/lib/go/src/testing/testing.go:1598 +0x99
testing.tRunner()
/usr/lib/go/src/testing/testing.go:1259 +0x22f
testing.runTests()
/usr/lib/go/src/testing/testing.go:1596 +0x7ca
testing.(*M).Run()
/usr/lib/go/src/testing/testing.go:1504 +0x9d1
code.fbi.h-da.de/danet/gosdn/nucleus.TestMain()
/home/aps/Code/hda/mpse-gosdn/gosdn/nucleus/initialise_test.go:72 +0xbfb
main.main()
_testmain.go:145 +0x264
Actual Behavior
Possible Fix
Steps to Reproduce
Context
Your Environment
- Version used:
- Environment name and version (e.g. go v1.16.3 on FreeBSD 13.0-current):
- Server type and version:
- Operating System and version:
Edited by Andre Sterba