Skip to content

Commit

Permalink
chore(all): delete minor unreachable code caused by t.Fatal (#6494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Abirdcfly authored Aug 11, 2022
1 parent 12cbbb9 commit 8460947
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions firestore/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ func TestQueryToProto(t *testing.T) {
got, err := test.in.toProto()
if err != nil {
t.Fatalf("%s: %v", test.desc, err)
continue
}
test.want.From = []*pb.StructuredQuery_CollectionSelector{{CollectionId: "C"}}
if !testEqual(got, test.want) {
Expand All @@ -468,13 +467,11 @@ func TestQueryFromProtoRoundTrip(t *testing.T) {
proto, err := test.in.Serialize()
if err != nil {
t.Fatalf("%s: %v", test.desc, err)
continue
}
fmt.Printf("proto: %v\n", proto)
got, err := Query{c: c}.Deserialize(proto)
if err != nil {
t.Fatalf("%s: %v", test.desc, err)
continue
}

want := test.in
Expand Down
1 change: 0 additions & 1 deletion pubsub/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,6 @@ func TestIntegration_OrderedKeys_JSON(t *testing.T) {
mu.Lock()
defer mu.Unlock()
if err := testutil2.VerifyKeyOrdering(publishData, receiveData); err != nil {
t.Fatal(err)
t.Fatalf("CreateTopic error: %v", err)
}
}
Expand Down
6 changes: 0 additions & 6 deletions spanner/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,6 @@ func TestIntegration_SingleUse(t *testing.T) {
}
if !found {
t.Fatalf("%d: got unexpected result from SingleUse.ReadUsingIndex: %v, want %v", i, got, test.want)
break
}
}
rts, err = su.Timestamp()
Expand Down Expand Up @@ -2541,19 +2540,16 @@ func TestIntegration_BatchQuery(t *testing.T) {
row2, err2 := iter2.Next()
if err1 != err2 {
t.Fatalf("execution failed for different reasons: %v, %v", err1, err2)
continue
}
if !testEqual(row1, row2) {
t.Fatalf("execution returned different values: %v, %v", row1, row2)
continue
}
if row1 == nil {
continue
}
var a, b string
if err = row1.Columns(&a, &b); err != nil {
t.Fatalf("failed to parse row %v", err)
continue
}
if a == str1 && b == str2 {
gotResult = true
Expand Down Expand Up @@ -2631,15 +2627,13 @@ func TestIntegration_BatchRead(t *testing.T) {
}
if !testEqual(row1, row2) {
t.Fatalf("execution returned different values: %v, %v", row1, row2)
continue
}
if row1 == nil {
continue
}
var a, b string
if err = row1.Columns(&a, &b); err != nil {
t.Fatalf("failed to parse row %v", err)
continue
}
if a == str1 && b == str2 {
gotResult = true
Expand Down
1 change: 0 additions & 1 deletion spanner/oc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ func TestOCStats_GFE_Latency(t *testing.T) {
}
if err != nil {
t.Fatal(err.Error())
break
}
}

Expand Down

0 comments on commit 8460947

Please sign in to comment.