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
The TestFileStreamingService in store/streaming/file/service_test.go fails but the "Tests / Code Coverage" Github Actions do not indicate that it does.
The above output is from running the test in IntelliJ.
The problem is that there's a globally defined testStreamingService variable used in some helper functions for the test, but it's not being set. In the TestFileStreamingService func, there is this: testStreamingService, err := NewStreamingService(...), but because of the := there, a new variable is being created, shadowing the global one instead of setting it. So when the helper gets called and tries to use the global one, it's nil and we get that error.
Version
First noticed in v0.46.7.
Also reproducible in main at 7050eb91f2: "feat(collections): implement Iteration (#14222)".
Steps to Reproduce
Run this from the root of the repo:
$ go test -mod=readonly -timeout 30m -tags='ledger test_ledger_mock' github.com/cosmos/cosmos-sdk/store/streaming/file
It also runs if you do a make test (possibly need go clean -testcache first).
I'm running this on an Apple M1 Pro with macOS Ventura 13.0.
I ran the test using both go 1.18.3 (e.g. in v0.46.7) and go 1.19 (e.g. in main), with the same results from both.
The text was updated successfully, but these errors were encountered:
SpicyLemon
changed the title
TestFileStreamingService fails and also doesn't run in Github Actions
TestFileStreamingService fails and is missed by the Github actions.
Dec 14, 2022
Summary of Bug
The
TestFileStreamingService
instore/streaming/file/service_test.go
fails but the "Tests / Code Coverage" Github Actions do not indicate that it does.The above output is from running the test in IntelliJ.
The problem is that there's a globally defined
testStreamingService
variable used in some helper functions for the test, but it's not being set. In theTestFileStreamingService
func, there is this:testStreamingService, err := NewStreamingService(...)
, but because of the:=
there, a new variable is being created, shadowing the global one instead of setting it. So when the helper gets called and tries to use the global one, it'snil
and we get that error.Version
First noticed in
v0.46.7
.Also reproducible in
main
at7050eb91f2
: "feat(collections): implement Iteration (#14222)".Steps to Reproduce
Run this from the root of the repo:
It also runs if you do a
make test
(possibly needgo clean -testcache
first).Example of it passing in a Github Action: https://github.com/cosmos/cosmos-sdk/actions/runs/3696863992/jobs/6261146822
I'm running this on an Apple M1 Pro with macOS Ventura 13.0.
I ran the test using both go 1.18.3 (e.g. in
v0.46.7
) and go 1.19 (e.g. inmain
), with the same results from both.The text was updated successfully, but these errors were encountered: