Closed shahzadlone closed 1 year ago
Another failing test
=== Failed
=== FAIL: tests/integration/cli TestPingCommandToInvalidHost (unknown)
==================
WARNING: DATA RACE
Write at 0x000005ef7378 by goroutine 7363:
github.com/sourcenetwork/defradb/tests/integration/cli.captureOutput()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:166 +0xd0
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraCommand()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:121 +0x4f6
github.com/sourcenetwork/defradb/tests/integration/cli.TestPingCommandToInvalidHost()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/client_ping_test.go:40 +0x344
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x47
Previous read at 0x000005ef7378 by goroutine 7365:
github.com/sourcenetwork/defradb/cli.(*DefraCommand).Execute()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/cli.go:108 +0x104
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:93 +0x1db
Goroutine 7363 (running) created at:
testing.(*T).Run()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x75d
testing.runTests.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1846 +0x99
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.runTests()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1844 +0x7ec
testing.(*M).Run()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1726 +0xa84
main.main()
_testmain.go:117 +0x2e9
Goroutine 7365 (running) created at:
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:88 +0x731
github.com/sourcenetwork/defradb/tests/integration/cli.TestPingCommandToInvalidHost()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/client_ping_test.go:39 +0x157
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x47
==================
==================
WARNING: DATA RACE
Write at 0x000005ef7368 by goroutine 7363:
github.com/sourcenetwork/defradb/tests/integration/cli.captureOutput()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:167 +0x10a
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraCommand()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:121 +0x4f6
github.com/sourcenetwork/defradb/tests/integration/cli.TestPingCommandToInvalidHost()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/client_ping_test.go:40 +0x344
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x47
Previous read at 0x000005ef7368 by goroutine 7365:
go.uber.org/zap.(*sinkRegistry).newFileSinkFromPath()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/sink.go:155 +0x70
go.uber.org/zap.(*sinkRegistry).newFileSinkFromURL()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/sink.go:147 +0x19e
go.uber.org/zap.(*sinkRegistry).newFileSinkFromURL-fm()
<autogenerated>:1 +0x44
go.uber.org/zap.(*sinkRegistry).newSink()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/sink.go:115 +0x358
go.uber.org/zap.open()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/writer.go:71 +0x31d
go.uber.org/zap.Open()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/writer.go:51 +0x67
go.uber.org/zap.Config.openSinks()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/config.go:254 +0x79
go.uber.org/zap.Config.Build()
/home/jsimnz/Workspace/go/pkg/mod/go.uber.org/zap@v1.24.0/config.go:179 +0x137
github.com/sourcenetwork/defradb/logging.buildZapLogger()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/logging/logger.go:243 +0x653
github.com/sourcenetwork/defradb/logging.(*logger).ApplyConfig()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/logging/logger.go:161 +0x93
github.com/sourcenetwork/defradb/logging.updateLoggers()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/logging/registry.go:51 +0x264
github.com/sourcenetwork/defradb/logging.SetConfig()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/logging/logging.go:76 +0x119
github.com/sourcenetwork/defradb/config.(*LoggingConfig).load()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/config/config.go:641 +0x331
github.com/sourcenetwork/defradb/config.(*Config).load()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/config/config.go:239 +0x284
github.com/sourcenetwork/defradb/config.(*Config).LoadWithRootdir()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/config/config.go:152 +0x28e
github.com/sourcenetwork/defradb/cli.MakeStartCommand.func1()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/start.go:61 +0x1e4
github.com/spf13/cobra.(*Command).execute()
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:915 +0xa02
github.com/spf13/cobra.(*Command).ExecuteC()
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x5fa
github.com/spf13/cobra.(*Command).ExecuteContextC()
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1001 +0x1ee
github.com/sourcenetwork/defradb/cli.(*DefraCommand).Execute()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/cli.go:109 +0x171
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:93 +0x1db
Goroutine 7363 (running) created at:
testing.(*T).Run()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x75d
testing.runTests.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1846 +0x99
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.runTests()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1844 +0x7ec
testing.(*M).Run()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1726 +0xa84
main.main()
_testmain.go:117 +0x2e9
Goroutine 7365 (running) created at:
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:88 +0x731
github.com/sourcenetwork/defradb/tests/integration/cli.TestPingCommandToInvalidHost()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/client_ping_test.go:39 +0x157
testing.tRunner()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1446 +0x216
testing.(*T).Run.func1()
/home/jsimnz/sdk/go1.19.7/src/testing/testing.go:1493 +0x47
==================
utils.go:123: executing defra command with args [--url localhost:54447 client ping --url '1!2:3!4' --rootdir /tmp/TestPingCommandToInvalidHost128614397/003]
panic: Process cannot add children after being closed
goroutine 2864 [running]:
github.com/jbenet/goprocess.(*process).AddChild(0xc0069772c0, {0x28f3f90, 0xc0069775c0})
/home/jsimnz/Workspace/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:99 +0x42d
github.com/jbenet/goprocess.(*process).Go(0xc00022d500?, 0xc008b41e60)
/home/jsimnz/Workspace/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:132 +0x445
github.com/libp2p/go-libp2p-kad-dht.New({0x28e4c98, 0xc006957ec0}, {0x28f8120?, 0xc0010aec00}, {0xc006976420, 0x8, 0x1fffffffffffff?})
/home/jsimnz/Workspace/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.23.0/dht.go:231 +0xcb3
github.com/libp2p/go-libp2p-kad-dht/dual.New({0x28e4c98, 0xc006957ec0}, {0x28f8120?, 0xc0010aec00?}, {0xc001514040, 0x5, 0x8})
/home/jsimnz/Workspace/go/pkg/mod/github.com/libp2p/go-libp2p-kad-dht@v0.23.0/dual/dual.go:124 +0x753
github.com/sourcenetwork/defradb/node.newDHT({0x28e4c98, 0xc006957ec0}, {0x28f8120?, 0xc0010aec00?}, {0x7efe7c0acf48, 0xc0045bc6c0})
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/node/node.go:428 +0x726
github.com/sourcenetwork/defradb/node.NewNode.func1({0x28f8120, 0xc0010aec00})
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/node/node.go:126 +0xb1
github.com/libp2p/go-libp2p/config.(*Config).NewNode(0xc0045e9400)
/home/jsimnz/Workspace/go/pkg/mod/github.com/libp2p/go-libp2p@v0.27.1/config/config.go:341 +0x81d
github.com/libp2p/go-libp2p.NewWithoutDefaults({0xc0045bccc0, 0x7, 0xc})
/home/jsimnz/Workspace/go/pkg/mod/github.com/libp2p/go-libp2p@v0.27.1/libp2p.go:67 +0xe7
github.com/libp2p/go-libp2p.New(...)
/home/jsimnz/Workspace/go/pkg/mod/github.com/libp2p/go-libp2p@v0.27.1/libp2p.go:53
github.com/sourcenetwork/defradb/node.NewNode({0x28e4c98?, 0xc006957ec0}, {0x28ffa58?, 0xc0045dc0c0}, {0xc0001fd0a0, 0x1, 0x1})
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/node/node.go:134 +0xb05
github.com/sourcenetwork/defradb/cli.start({0x28e4c98?, 0xc006957ec0}, 0xc0069575c0)
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/start.go:258 +0xc2e
github.com/sourcenetwork/defradb/cli.MakeStartCommand.func2(0xc007d4e600, {0x22db3c4?, 0x4?, 0x8?})
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/start.go:77 +0x68
github.com/spf13/cobra.(*Command).execute(0xc007d4e600, {0xc006972380, 0x8, 0x8})
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0xbf5
github.com/spf13/cobra.(*Command).ExecuteC(0xc006926600)
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x5fb
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
/home/jsimnz/Workspace/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1001
github.com/sourcenetwork/defradb/cli.(*DefraCommand).Execute(0xc000e0cfc0, {0x28e4c98?, 0xc006957ec0})
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/cli/cli.go:109 +0x1ef
github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode.func1()
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:93 +0x1dc
created by github.com/sourcenetwork/defradb/tests/integration/cli.runDefraNode
/home/jsimnz/Workspace/go/src/github.com/sourcenetwork/defradb/tests/integration/cli/utils.go:88 +0x732
Also:
=== Failed
=== FAIL: tests/integration/cli TestRequestWithErrorNoField (2.07s)
Created config file at /tmp/TestRequestWithErrorNoField3768494208/001/config.yaml
Starting DefraDB service...
Opening badger store
Starting P2P node
Execution error
utils.go:94:
Error Trace: /home/runner/work/defradb/defradb/tests/integration/cli/utils.go:94
/opt/hostedtoolcache/go/1.19.9/x64/src/runtime/asm_amd64.s:1594
Error: Received unexpected error:
failed to listen on TCP address 0.0.0.0:57320: listen tcp 0.0.0.0:57320: bind: address already in use. Stack: /home/runner/work/defradb/defradb/cli/start.go:315 (0x1ee56d4)
start: return nil, errors.Wrap(fmt.Sprintf("failed to listen on TCP address %v", addr), err)
/home/runner/work/defradb/defradb/cli/start.go:77 (0x1ee2d08)
MakeStartCommand.func2: di, err := start(cmd.Context(), cfg)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 (0xacfb95)
(*Command).execute: if err := c.RunE(c, argWoFlags); err != nil {
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 (0xad08fb)
(*Command).ExecuteC: err = cmd.execute(flags)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1001 (0x1ed410f)
(*DefraCommand).Execute: return c.ExecuteC()
/home/runner/work/defradb/defradb/cli/cli.go:109 (0x1ed4092)
(*DefraCommand).Execute: cmd, err := defraCmd.RootCmd.ExecuteContextC(ctx)
/home/runner/work/defradb/defradb/tests/integration/cli/utils.go:93 (0x1ee951c)
runDefraNode.func1: err := defraCmd.Execute(ctx)
/opt/hostedtoolcache/go/1.19.9/x64/src/runtime/asm_amd64.s:1594 (0x4a90c1)
goexit: BYTE $0x90 // NOP
Test: TestRequestWithErrorNoField
utils.go:123: executing defra command with args [--url localhost:49887 client schema add -f /tmp/TestRequestWithErrorNoField3768494208/003/schema.graphql --rootdir /tmp/TestRequestWithErrorNoField3768494208/004]
client_query_test.go:61: expected [""] to contain "success"
closed by #1839