Skip to content

Commit

Permalink
test(spanner): skip/remove oc span related tests (googleapis#11260)
Browse files Browse the repository at this point in the history
I removed the obvious open census tests that were failing in googleapis#11257. Some others it was not clear to me if these functions should be instrumented with OT or not, so I skipped them for now and will let the spanner team decide what to do with those tests.

Related: googleapis#11230
  • Loading branch information
codyoss authored Dec 10, 2024
1 parent a942986 commit fdbd33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
3 changes: 3 additions & 0 deletions spanner/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5028,6 +5028,7 @@ func transactionOptionsTestCases() []TransactionOptionsTestCase {
}

func TestClient_DoForEachRow_ShouldNotEndSpanWithIteratorDoneError(t *testing.T) {
t.Skip("open census spans are no longer exported by gapics")
// This test cannot be parallel, as the TestExporter does not support that.
te := itestutil.NewTestExporter()
defer te.Unregister()
Expand Down Expand Up @@ -5072,6 +5073,7 @@ func TestClient_DoForEachRow_ShouldNotEndSpanWithIteratorDoneError(t *testing.T)
}

func TestClient_DoForEachRow_ShouldEndSpanWithQueryError(t *testing.T) {
t.Skip("open census spans are no longer exported by gapics")
// This test cannot be parallel, as the TestExporter does not support that.
te := itestutil.NewTestExporter()
defer te.Unregister()
Expand Down Expand Up @@ -5902,6 +5904,7 @@ func checkBatchWriteSpan(t *testing.T, errors []error, code codes.Code) {
}
}
func TestClient_BatchWrite_SpanExported(t *testing.T) {
t.Skip("open census spans are no longer exported by gapics")
testcases := []struct {
name string
code codes.Code
Expand Down
18 changes: 0 additions & 18 deletions spanner/oc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,6 @@ import (
structpb "google.golang.org/protobuf/types/known/structpb"
)

// Check that stats are being exported.
func TestOCStats(t *testing.T) {
DisableGfeLatencyAndHeaderMissingCountViews()
te := testutil.NewTestExporter()
defer te.Unregister()

_, c, teardown := setupMockedTestServer(t)
defer teardown()

c.Single().ReadRow(context.Background(), "Users", Key{"alice"}, []string{"email"})
// Wait until we see data from the view.
select {
case <-te.Stats:
case <-time.After(1 * time.Second):
t.Fatal("no stats were exported before timeout")
}
}

func TestOCStats_SessionPool(t *testing.T) {
skipUnsupportedPGTest(t)
DisableGfeLatencyAndHeaderMissingCountViews()
Expand Down

0 comments on commit fdbd33b

Please sign in to comment.