You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
Intermittently Windows tests fail with the following error:
Run go test ./...
go test ./...
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
GOROOT: C:\hostedtoolcache\windows\go\1.16.4\x64
? github.com/dylanratcliffe/deviant_cli [no test files]
? github.com/dylanratcliffe/deviant_cli/backends [no test files]
ok github.com/dylanratcliffe/deviant_cli/backends/dpkg 0.170s
ok github.com/dylanratcliffe/deviant_cli/backends/etcdata 0.043s
ok github.com/dylanratcliffe/deviant_cli/backends/hosts 0.031s
? github.com/dylanratcliffe/deviant_cli/backends/k8s [no test files]
ok github.com/dylanratcliffe/deviant_cli/backends/netstat 0.050s
ok github.com/dylanratcliffe/deviant_cli/backends/network 0.065s
ok github.com/dylanratcliffe/deviant_cli/backends/psutil 1.175s
ok github.com/dylanratcliffe/deviant_cli/backends/rpm 0.134s
ok github.com/dylanratcliffe/deviant_cli/backends/system 0.074s
? github.com/dylanratcliffe/deviant_cli/cmd [no test files]
ok github.com/dylanratcliffe/deviant_cli/discovery 0.078s
--- FAIL: TestItemCaching (0.13s)
--- FAIL: TestItemCaching/Cached_items_are_available_after_0.5x_duration (0.13s)
cache_test.go:114: Cache result expected [type:"furniture" uniqueAttribute:"serialNumber" attributes:{attrStruct:{fields:{key:"colour" value:{string_value:"black"}} fields:{key:"serialNumber" value:{string_value:"982734928347"}} fields:{key:"type" value:{string_value:"couch"}}}} metadata:{backendName:"test" requestMethod:FIND timestamp:{seconds:1622817639 nanos:502204800} backendDuration:{nanos:1000000} backendDurationPerItem:{nanos:1000000} backendPackage:"test-package"} context:"home" linkedItemRequests:{type:"furniture" query:"1234"} linkedItems:{type:"furniture" UniqueAttributeValue:"linked" context:"home"}] but got []
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
goroutine 9 [running]:
testing.tRunner.func1.2(0x15a68a0, 0xc000022888)
C:/hostedtoolcache/windows/go/1.16.4/x64/src/testing/testing.go:1143 +0x345
testing.tRunner.func1(0xc00003d980)
C:/hostedtoolcache/windows/go/1.16.4/x64/src/testing/testing.go:1146 +0x4b6
panic(0x15a68a0, 0xc000022888)
C:/hostedtoolcache/windows/go/1.16.4/x64/src/runtime/panic.go:965 +0x1c7
github.com/dylanratcliffe/deviant_cli/sources.TestItemCaching.func1(0xc00003d980)
D:/a/deviant_cli/deviant_cli/sources/cache_test.go:118 +0x5ad
testing.tRunner(0xc00003d980, 0xc000004750)
C:/hostedtoolcache/windows/go/1.16.4/x64/src/testing/testing.go:1193 +0xef
created by testing.(*T).Run
C:/hostedtoolcache/windows/go/1.16.4/x64/src/testing/testing.go:1238 +0x2b3
FAIL github.com/dylanratcliffe/deviant_cli/sources 0.168s
? github.com/dylanratcliffe/deviant_cli/util [no test files]
? github.com/dylanratcliffe/deviant_cli/util/network [no test files]
ok github.com/dylanratcliffe/deviant_cli/util/parser 0.023s
FAIL
Error: Process completed with exit code 1.
Could be something to do with timing or race conditions, maybe the Windows test machines are slow and therefore the caches is getting cleared unexpectedly. Might need to look into using some kind of scheduler rather than just a sleep
The text was updated successfully, but these errors were encountered:
Intermittently Windows tests fail with the following error:
Could be something to do with timing or race conditions, maybe the Windows test machines are slow and therefore the caches is getting cleared unexpectedly. Might need to look into using some kind of scheduler rather than just a sleep
The text was updated successfully, but these errors were encountered: