(ctx context.Context, t *testing.T)
| 46 | } |
| 47 | |
| 48 | func newHarness(ctx context.Context, t *testing.T) (drivertest.Harness, error) { |
| 49 | t.Helper() |
| 50 | |
| 51 | conn, done := setup.NewGCPgRPCConn(ctx, t, endPoint, "pubsub") |
| 52 | pubClient, err := PublisherClient(ctx, conn) |
| 53 | if err != nil { |
| 54 | return nil, fmt.Errorf("making publisher client: %v", err) |
| 55 | } |
| 56 | subClient, err := SubscriberClient(ctx, conn) |
| 57 | if err != nil { |
| 58 | return nil, fmt.Errorf("making subscription client: %v", err) |
| 59 | } |
| 60 | return &harness{closer: done, pubClient: pubClient, subClient: subClient, numTopics: 0, numSubs: 0}, nil |
| 61 | } |
| 62 | |
| 63 | func (h *harness) CreateTopic(ctx context.Context, testName string) (dt driver.Topic, cleanup func(), err error) { |
| 64 | // We may encounter topics that were created by a previous test run and were |
nothing calls this directly
no test coverage detected