Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky TestIndexCreate cli integration test even without race. #1628

Closed
shahzadlone opened this issue Jul 11, 2023 · 1 comment
Closed

Flaky TestIndexCreate cli integration test even without race. #1628

shahzadlone opened this issue Jul 11, 2023 · 1 comment
Labels
area/testing Related to any test or testing suite bug Something isn't working

Comments

@shahzadlone
Copy link
Member

Test command:

 gotestsum --format pkgname -- ./...

Output:

=== Failed
=== FAIL: tests/integration/cli TestIndexCreate_IfNoCollectionArg_ShouldFail (2.09s)
Created config file at /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/config.yaml
Starting DefraDB service...
Opening badger store
    utils.go:123: executing defra command with args [--url localhost:52043 client schema add -f /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/003/schema.graphql --rootdir /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/004]
    client_index_create_test.go:24: expected [""] to contain "success"

=== FAIL: tests/integration/cli TestIndexCreate_IfCollectionExists_ShouldCreateIndex (1.29s)
Created config file at /tmp/TestIndexCreate_IfCollectionExists_ShouldCreateIndex2309088202/001/config.yaml
Starting DefraDB service...
Opening badger store
    utils.go:123: executing defra command with args [--url localhost:53817 client schema add -f /tmp/TestIndexCreate_IfCollectionExists_ShouldCreateIndex2309088202/003/schema.graphql --rootdir /tmp/TestIndexCreate_IfCollectionExists_ShouldCreateIndex2309088202/004]
    client_index_create_test.go:24: expected [""] to contain "success"

=== FAIL: tests/integration/cli TestIndexCreate_IfInternalError_ShouldFail (unknown)
Created config file at /tmp/TestIndexCreate_IfInternalError_ShouldFail785618471/001/config.yaml
Starting DefraDB service...
Opening badger store
Starting P2P node
Started RPC server
Providing HTTP API at http://localhost:61190/api/v0. Use the GraphQL request endpoint at http://localhost:61190/api/v0/graphql
    utils.go:123: executing defra command with args [--url localhost:61190 client index create --collection User --fields Name --name users_name_index --rootdir /tmp/TestIndexCreate_IfInternalError_ShouldFail785618471/003]
2023-07-11T18:12:27.717-0400    ERROR   badger  [email protected]/memtable.go:160    Got error: While opening memtable: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem error: while opening file: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem error: open /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem: no such file or directory
unable to open: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem
github.com/dgraph-io/ristretto/z.OpenMmapFile
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/[email protected]/z/file.go:80
github.com/dgraph-io/badger/v3.(*logFile).open
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:556
github.com/dgraph-io/badger/v3.(*DB).openMemTable
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:130
github.com/dgraph-io/badger/v3.(*DB).newMemTable
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:153
github.com/dgraph-io/badger/v3.Open
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:338
github.com/sourcenetwork/defradb/datastore/badger/v3.NewDatastore
        /home/shahzad/~~/defradb/datastore/badger/v3/datastore.go:157
github.com/sourcenetwork/defradb/cli.start
        /home/shahzad/~~/defradb/cli/start.go:229
github.com/sourcenetwork/defradb/cli.MakeStartCommand.func2
        /home/shahzad/~~/defradb/cli/start.go:76
github.com/spf13/cobra.(*Command).execute
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:940
github.com/spf13/cobra.(*Command).ExecuteC
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).ExecuteContextC
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:1001
github.com/sourcenetwork/defradb/cli.(*DefraCommand).Execute
        /home/shahzad/~~/defradb/cli/cli.go:116
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1
        /home/shahzad/~~/defradb/tests/integration/cli/utils.go:93
runtime.goexit
        /home/shahzad/.local/bin/go1.19.5/src/runtime/asm_amd64.s:1594 for id: 1

2023-07-11T18:12:27.717-0400    ERROR   badger  [email protected]/db.go:261  Received err: newMemTable error: While opening memtable: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem error: while opening file: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem error: open /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem: no such file or directory
unable to open: /tmp/TestIndexCreate_IfNoCollectionArg_ShouldFail4127537412/001/data/00001.mem
github.com/dgraph-io/ristretto/z.OpenMmapFile
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/[email protected]/z/file.go:80
github.com/dgraph-io/badger/v3.(*logFile).open
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:556
github.com/dgraph-io/badger/v3.(*DB).openMemTable
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:130
github.com/dgraph-io/badger/v3.(*DB).newMemTable
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/memtable.go:153
github.com/dgraph-io/badger/v3.Open
        /home/shahzad/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/db.go:338
github.com/sourcenetwork/defradb/datastore/badger/v3.NewDatastore
        /home/shahzad/~~/defradb/datastore/badger/v3/datastore.go:157
github.com/sourcenetwork/defradb/cli.start
        /home/shahzad/~~/defradb/cli/start.go:229
github.com/sourcenetwork/defradb/cli.MakeStartCommand.func2
        /home/shahzad/~~/defradb/cli/start.go:76
github.com/spf13/cobra.(*Command).execute
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:940
github.com/spf13/cobra.(*Command).ExecuteC
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).ExecuteContextC
        /home/shahzad/go/pkg/mod/github.com/spf13/[email protected]/command.go:1001
github.com/sourcenetwork/defradb/cli.(*DefraCommand).Execute
        /home/shahzad/~~/defradb/cli/cli.go:116
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1
        /home/shahzad/~~/defradb/tests/integration/cli/utils.go:93
runtime.goexit
        /home/shahzad/.local/bin/go1.19.5/src/runtime/asm_amd64.s:1594. Cleaning up...
Execution error
panic: Fail in goroutine after TestIndexCreate_IfNoCollectionArg_ShouldFail has completed

goroutine 1686 [running]:
testing.(*common).Fail(0xc0000e8ea0)
        /home/shahzad/.local/bin/go1.19.5/src/testing/testing.go:824 +0xe5
testing.(*common).Errorf(0xc0000e8ea0, {0x1874f72?, 0xc0000e8ea0?}, {0xc003cb4330?, 0x47ba25?, 0x28d9620?})
        /home/shahzad/.local/bin/go1.19.5/src/testing/testing.go:941 +0x65
github.com/stretchr/testify/assert.Fail({0x1d4ba80, 0xc0000e8ea0}, {0xc00084ec80, 0xc3f}, {0x0, 0x0, 0x0})
        /home/shahzad/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:333 +0x384
github.com/stretchr/testify/assert.NoError({0x1d4ba80, 0xc0000e8ea0}, {0x1d496e0, 0xc000bed400}, {0x0, 0x0, 0x0})
        /home/shahzad/go/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1495 +0x105
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1()
        /home/shahzad/~~/defradb/tests/integration/cli/utils.go:94 +0x185
created by github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode
        /home/shahzad/~~/defradb/tests/integration/cli/utils.go:88 +0x4e5

@shahzadlone shahzadlone added bug Something isn't working area/testing Related to any test or testing suite labels Jul 11, 2023
@nasdf
Copy link
Member

nasdf commented Oct 4, 2023

closed by #1839

@nasdf nasdf closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Related to any test or testing suite bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants