Skip to content

Commit 6ed7f39

Browse files
darkowlzzPaulo Gomes
authored andcommitted
internal/helm/getter: remove transport reuse test
Since the transport reuse is dependent on the garbage collection, the result is inconsistent. It fails frequently when running the tests with the go race detector. Remove the test. Signed-off-by: Sunny <[email protected]>
1 parent 7c2435e commit 6ed7f39

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

internal/transport/transport_test.go

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,18 @@ func Test_TransportReuse(t *testing.T) {
3434
t.Errorf("error releasing transport t2: %v", err)
3535
}
3636

37-
t3 := NewOrIdle(nil)
38-
if t2 != t3 {
39-
t.Errorf("transported not reused")
40-
}
41-
42-
t4 := NewOrIdle(&tls.Config{
37+
t3 := NewOrIdle(&tls.Config{
4338
ServerName: "testing",
4439
})
45-
if t4.TLSClientConfig == nil || t4.TLSClientConfig.ServerName != "testing" {
40+
if t3.TLSClientConfig == nil || t3.TLSClientConfig.ServerName != "testing" {
4641
t.Errorf("TLSClientConfig not properly configured")
4742
}
4843

49-
err = Release(t4)
44+
err = Release(t3)
5045
if err != nil {
51-
t.Errorf("error releasing transport t4: %v", err)
46+
t.Errorf("error releasing transport t3: %v", err)
5247
}
53-
if t4.TLSClientConfig != nil {
48+
if t3.TLSClientConfig != nil {
5449
t.Errorf("TLSClientConfig not cleared after release")
5550
}
5651

0 commit comments

Comments
 (0)