Skip to content
This repository was archived by the owner on Nov 22, 2020. It is now read-only.
This repository was archived by the owner on Nov 22, 2020. It is now read-only.

hdfchain/hdfd: rpctest/rpc_harness_test.go; 17 LoC #833

Description

@githubvet

Found a possible issue in hdfchain/hdfd at rpctest/rpc_harness_test.go

The below snippet of Go code triggered static analysis which searches for goroutines and/or defer statements
which capture loop variables.

Click here to see the code in its original context.

Click here to show the 18 line(s) of Go which triggered the analyzer.
		for _, testCase := range tests {
			t.Logf("=== Running test: %v ===", testCase.name)

			c := make(chan struct{})
			go func() {
				testCase.f(ctx, mainHarness, t)
				c <- struct{}{}
			}()

			// Go wait for 10 seconds
			select {
			case <-c:
			case <-time.After(10 * time.Second):
				t.Logf("Test timeout, aborting running nodes")
				PanicAll(t)
				os.Exit(1)
			}
		}

commit ID: 3464dacd7d1ae95cfa57eec19eeac8658e88fe06

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions