Skip to content

Commit 2555efd

Browse files
authored
Merge pull request #19610 from henrybear327/robustness/fix_typo
Fix wrong error message in `loadKeyValueOperations`
2 parents f07e2ae + b692041 commit 2555efd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/robustness/report/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ func loadKeyValueOperations(path string) (operations []porcupine.Operation, err
138138
if os.IsNotExist(err) {
139139
return nil, nil
140140
}
141-
return nil, fmt.Errorf("failed to open watch operation file: %q, err: %w", path, err)
141+
return nil, fmt.Errorf("failed to open KV operation file: %q, err: %w", path, err)
142142
}
143143
file, err := os.OpenFile(path, os.O_RDONLY, 0o755)
144144
if err != nil {
145-
return nil, fmt.Errorf("failed to open watch operation file: %q, err: %w", path, err)
145+
return nil, fmt.Errorf("failed to open KV operation file: %q, err: %w", path, err)
146146
}
147147
defer file.Close()
148148
decoder := json.NewDecoder(file)
@@ -156,7 +156,7 @@ func loadKeyValueOperations(path string) (operations []porcupine.Operation, err
156156
}
157157
err = decoder.Decode(&operation)
158158
if err != nil {
159-
return nil, fmt.Errorf("failed to decode watch operation, err: %w", err)
159+
return nil, fmt.Errorf("failed to decode KV operation, err: %w", err)
160160
}
161161
operations = append(operations, porcupine.Operation{
162162
ClientId: operation.ClientID,
@@ -190,15 +190,15 @@ func persistKeyValueOperations(t *testing.T, lg *zap.Logger, path string, operat
190190
lg.Info("Saving operation history", zap.String("path", path))
191191
file, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o755)
192192
if err != nil {
193-
t.Errorf("Failed to save operation history: %v", err)
193+
t.Errorf("Failed to save KV operation history: %v", err)
194194
return
195195
}
196196
defer file.Close()
197197
encoder := json.NewEncoder(file)
198198
for _, op := range operations {
199199
err := encoder.Encode(op)
200200
if err != nil {
201-
t.Errorf("Failed to encode operation: %v", err)
201+
t.Errorf("Failed to encode KV operation: %v", err)
202202
}
203203
}
204204
}

0 commit comments

Comments
 (0)