defradb
defradb copied to clipboard
Flaky test TestQueryWithIndexOnManyToOne_MultipleViaOneToMany
=== Failed
=== FAIL: tests/integration/index TestQueryWithIndexOnManyToOne_MultipleViaOneToMany (0.13s)
Jul 26 20:58:33.278 INF tests.integration database=badger-in-memory client=http mutationType=collection-save databaseDir="" badgerEncryption=false skipNetworkTests=false changeDetector.Enabled=false changeDetector.SetupOnly=false changeDetector.SourceBranch=develop changeDetector.TargetBranch="" changeDetector.Repository=https://github.com/sourcenetwork/defradb.git
2024/07/26 20:58:33 http: panic serving 127.0.0.1:56696: Unclosed iterator at time of Txn.Discard.
goroutine 85074 [running]:
net/http.(*conn).serve.func1()
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:1868 +0xfc
panic({0x62e7880?, 0x84eb9c0?})
/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/panic.go:920 +0x270
github.com/sourcenetwork/badger/v4.(*Txn).Discard(0xc000f44400)
/home/runner/go/pkg/mod/github.com/sourcenetwork/badger/[email protected]/txn.go:524 +0x1fe
github.com/sourcenetwork/defradb/datastore/badger/v4.(*txn).discard(...)
/home/runner/work/defradb/defradb/datastore/badger/v4/datastore.go:780
github.com/sourcenetwork/defradb/datastore/badger/v4.(*txn).Discard(0xc000d490b0, {0x4ed6d5?, 0xc00237f6f8?})
/home/runner/work/defradb/defradb/datastore/badger/v4/datastore.go:776 +0x1c5
github.com/sourcenetwork/defradb/datastore.(*txn).Discard(0xc0016515c0, {0x853b360, 0xc0023c10b0})
/home/runner/work/defradb/defradb/datastore/txn.go:125 +0xb5
panic({0x62e7880?, 0x84eb9c0?})
/opt/hostedtoolcache/go/1.21.3/x64/src/runtime/panic.go:920 +0x270
make: *** [Makefile:307: test:coverage] Error 1
github.com/sourcenetwork/badger/v4.(*Txn).Discard(0xc000f44400)
/home/runner/go/pkg/mod/github.com/sourcenetwork/badger/[email protected]/txn.go:524 +0x1fe
github.com/sourcenetwork/badger/v4.(*Txn).Commit(0xc000f44400)
/home/runner/go/pkg/mod/github.com/sourcenetwork/badger/[email protected]/txn.go:665 +0x17f
github.com/sourcenetwork/defradb/datastore/badger/v4.(*txn).commit(0xc000d490b0)
/home/runner/work/defradb/defradb/datastore/badger/v4/datastore.go:765 +0x98
github.com/sourcenetwork/defradb/datastore/badger/v4.(*txn).Commit(0xc000d490b0, {0x0?, 0x0?})
/home/runner/work/defradb/defradb/datastore/badger/v4/datastore.go:761 +0x198
github.com/sourcenetwork/defradb/datastore.(*txn).Commit(0xc0016515c0, {0x853b360, 0xc0023c10b0})
/home/runner/work/defradb/defradb/datastore/txn.go:106 +0xa9
github.com/sourcenetwork/defradb/internal/db.(*db).ExecRequest(0xc001927a00?, {0x853b360, 0xc0023c0f90}, {0xc0023bfe60, 0x5f})
/home/runner/work/defradb/defradb/internal/db/store.go:38 +0x36f
github.com/sourcenetwork/defradb/http.(*storeHandler).ExecRequest(0xc001412a00?, {0x851a290?, 0xc000ce87e0}, 0xc001927a00)
/home/runner/work/defradb/defradb/http/handler_store.go:315 +0x43b
net/http.HandlerFunc.ServeHTTP(0xc001412a00, {0x851a290, 0xc000ce87e0}, 0xc0023bd8e8?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0024a2a20, {0x851a290, 0xc000ce87e0}, 0xc001927a00)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459 +0x526
net/http.HandlerFunc.ServeHTTP(0xc001412330, {0x851a290, 0xc000ce87e0}, 0x6559f80?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0024a2a20, {0x851a290, 0xc000ce87e0}, 0xc001927a00)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 +0x6f5
github.com/sourcenetwork/defradb/http.(*Router).ServeHTTP(0xc0002d8810, {0x851a290, 0xc000ce87e0}, 0xc0023bd8e8?)
/home/runner/work/defradb/defradb/http/router.go:67 +0xac
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0024a2e40, {0x851a290, 0xc000ce87e0}, 0xc001927a00)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459 +0x526
net/http.HandlerFunc.ServeHTTP(0xc0012fa1f0, {0x851a290, 0xc000ce87e0}, 0x56c4620?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/sourcenetwork/defradb/http.AuthMiddleware.func1({0x851a290, 0xc000ce87e0}, 0xc001927a00)
/home/runner/work/defradb/defradb/http/auth.go:57 +0x5ed
net/http.HandlerFunc.ServeHTTP(0xc0019d9f20, {0x851a290, 0xc000ce87e0}, 0x0?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/sourcenetwork/defradb/http.TransactionMiddleware.func1({0x851a290, 0xc000ce87e0}, 0xc001927a00)
/home/runner/work/defradb/defradb/http/middleware.go:83 +0x59a
net/http.HandlerFunc.ServeHTTP(0xc0019d9f50, {0x851a290, 0xc000ce87e0}, 0xc00193f8f0?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/sourcenetwork/defradb/http.NewHandler.func1.ApiMiddleware.func1.1({0x851a290, 0xc000ce87e0}, 0xc001871770?)
/home/runner/work/defradb/defradb/http/middleware.go:71 +0x17d
net/http.HandlerFunc.ServeHTTP(0xc001ed95f0, {0x851a290, 0xc000ce87e0}, 0x7?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0024a2e40, {0x851a290, 0xc000ce87e0}, 0xc001927900)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 +0x6f5
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x851a290, 0xc000ce87e0}, 0xc001927900)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:327 +0x4e6
net/http.HandlerFunc.ServeHTTP(0xc0013db580, {0x851a290, 0xc000ce87e0}, 0xc001879965?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc0024a2de0, {0x851a290, 0xc000ce87e0}, 0xc001927900)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:459 +0x526
net/http.HandlerFunc.ServeHTTP(0xc0012fa210, {0x851a290, 0xc000ce87e0}, 0xb0533e0?)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2136 +0x48
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc0024a2de0, {0x851a290, 0xc000ce87e0}, 0xc001926b00)
/home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90 +0x67c
github.com/sourcenetwork/defradb/http.(*Handler).ServeHTTP(0xc0013db6a0, {0x851a290, 0xc000ce87e0}, 0x0?)
/home/runner/work/defradb/defradb/http/handler.go:107 +0xa9
net/http.serverHandler.ServeHTTP({0x850b598?}, {0x851a290, 0xc000ce87e0}, 0xc001926b00)
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2938 +0x2a2
net/http.(*conn).serve(0xc000158f30, {0x853b360, 0xc001992120})
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:2009 +0xc25
created by net/http.(*Server).Serve in goroutine 85039
/opt/hostedtoolcache/go/1.21.3/x64/src/net/http/server.go:3086 +0x80d
utils2.go:1820:
Error Trace: /home/runner/work/defradb/defradb/tests/integration/utils2.go:1820
/home/runner/work/defradb/defradb/tests/integration/utils2.go:1852
/home/runner/work/defradb/defradb/tests/integration/utils2.go:1720
/home/runner/work/defradb/defradb/tests/integration/utils2.go:336
/home/runner/work/defradb/defradb/tests/integration/utils2.go:226
/home/runner/work/defradb/defradb/tests/integration/utils2.go:180
/home/runner/work/defradb/defradb/tests/integration/index/query_with_relation_filter_test.go:980
Error: Should be empty, but was [Post "http://127.0.0.1:45527/api/v0/graphql": EOF]
Test: TestQueryWithIndexOnManyToOne_MultipleViaOneToMany
Jul 26 20:58:33.382 INF db Closing DefraDB process...
Jul 26 20:58:33.410 INF db Successfully closed running process