Skip to content

Commit 23d0e0f

Browse files
authored
Merge branch 'master' into ndyakov/state-machine-conn
2 parents a2c7a25 + a3a369b commit 23d0e0f

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

doctests/cmds_hash_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func ExampleClient_hset() {
7979

8080
keys := make([]string, 0, len(res6))
8181

82-
for key, _ := range res6 {
82+
for key := range res6 {
8383
keys = append(keys, key)
8484
}
8585

@@ -186,7 +186,7 @@ func ExampleClient_hgetall() {
186186

187187
keys := make([]string, 0, len(hGetAllResult2))
188188

189-
for key, _ := range hGetAllResult2 {
189+
for key := range hGetAllResult2 {
190190
keys = append(keys, key)
191191
}
192192

hset_benchmark_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func benchmarkHSETOperations(b *testing.B, rdb *redis.Client, ctx context.Contex
8686
b.Fatalf("HSET operation failed: %v", err)
8787
}
8888
}
89-
totalTimes = append(totalTimes, time.Now().Sub(startTime))
89+
totalTimes = append(totalTimes, time.Since(startTime))
9090
}
9191

9292
// Stop the timer to calculate metrics
@@ -164,7 +164,7 @@ func benchmarkHSETPipelined(b *testing.B, rdb *redis.Client, ctx context.Context
164164
if err != nil {
165165
b.Fatalf("Pipeline execution failed: %v", err)
166166
}
167-
totalTimes = append(totalTimes, time.Now().Sub(startTime))
167+
totalTimes = append(totalTimes, time.Since(startTime))
168168
}
169169

170170
b.StopTimer()

maintnotifications/e2e/utils_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ func containsSubstring(s, substr string) bool {
4343
return false
4444
}
4545

46-
func min(a, b int) int {
47-
if a < b {
48-
return a
49-
}
50-
return b
51-
}
52-
5346
func printLog(group string, isError bool, format string, args ...interface{}) {
5447
_, filename, line, _ := runtime.Caller(2)
5548
filename = filepath.Base(filename)

push/push_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func TestRegistry(t *testing.T) {
144144
t.Run("NewRegistry", func(t *testing.T) {
145145
registry := NewRegistry()
146146
if registry == nil {
147-
t.Error("NewRegistry should not return nil")
147+
t.Fatal("NewRegistry should not return nil")
148148
}
149149

150150
if registry.handlers == nil {
@@ -407,7 +407,7 @@ func TestProcessor(t *testing.T) {
407407
t.Run("NewProcessor", func(t *testing.T) {
408408
processor := NewProcessor()
409409
if processor == nil {
410-
t.Error("NewProcessor should not return nil")
410+
t.Fatal("NewProcessor should not return nil")
411411
}
412412

413413
if processor.registry == nil {

0 commit comments

Comments
 (0)