(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func 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 | |
| 88 | func BenchmarkRabbit(b *testing.B) { |
| 89 | ctx := context.Background() |
nothing calls this directly
no test coverage detected