MCPcopy Create free account
hub / github.com/google/go-cloud / TestConformance

Function TestConformance

pubsub/rabbitpubsub/rabbit_test.go:64–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestConformance(t *testing.T) {
65 harnessMaker := func(_ context.Context, t *testing.T) (drivertest.Harness, error) {
66 t.Helper()
67
68 return &harness{conn: mustDialRabbit(t)}, nil
69 }
70 _, isFake := mustDialRabbit(t).(*fakeConnection)
71 asTests := []drivertest.AsTest{rabbitAsTest{isFake}}
72 drivertest.RunConformanceTests(t, harnessMaker, asTests)
73
74 // Run the conformance tests with the fake if we haven't.
75 if isFake {
76 return
77 }
78 t.Logf("now running tests with the fake")
79 harnessMaker = func(_ context.Context, t *testing.T) (drivertest.Harness, error) {
80 t.Helper()
81
82 return &harness{conn: newFakeConnection()}, nil
83 }
84 asTests = []drivertest.AsTest{rabbitAsTest{true}}
85 drivertest.RunConformanceTests(t, harnessMaker, asTests)
86}
87
88func BenchmarkRabbit(b *testing.B) {
89 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

RunConformanceTestsFunction · 0.92
mustDialRabbitFunction · 0.85
newFakeConnectionFunction · 0.85

Tested by

no test coverage detected