Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Use constant for repeated string
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbelvin committed Oct 5, 2018
1 parent 2ac8b70 commit 75969ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions impl/sql/mutationstorage/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func TestRandShard(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create Mutations: %v", err)
}
domainID := "foo"

for _, tc := range []struct {
desc string
Expand Down Expand Up @@ -78,7 +77,6 @@ func TestSend(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create Mutations: %v", err)
}
domainID := "foo"
update := []byte("bar")
ts1 := time.Now()
ts2 := ts1.Add(time.Duration(1))
Expand Down Expand Up @@ -115,7 +113,6 @@ func TestWatermark(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create Mutations: %v", err)
}
domainID := "foo"
ts1 := time.Now()
ts2 := ts1.Add(time.Duration(1))

Expand All @@ -142,7 +139,7 @@ func TestWatermark(t *testing.T) {
},
} {
for shardID, ts := range tc.send {
if err := m.send(ctx, domainID, shardID, []byte("foo"), ts); err != nil {
if err := m.send(ctx, domainID, shardID, []byte("mutation"), ts); err != nil {
t.Fatalf("send(%v, %v): %v", shardID, ts, err)
}
}
Expand All @@ -163,7 +160,6 @@ func TestReadQueue(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create mutations: %v", err)
}
domainID := "readqueue"
shardID := int64(5)
if err := m.AddShards(ctx, domainID, shardID); err != nil {
t.Fatalf("AddShards(): %v", err)
Expand Down

0 comments on commit 75969ea

Please sign in to comment.