Skip to content

Commit cf27d73

Browse files
authored
[+] improve Reaper test coverage (#1384)
1 parent 6ac3610 commit cf27d73

2 files changed

Lines changed: 320 additions & 72 deletions

File tree

internal/reaper/reaper.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,7 @@ func (r *Reaper) ShutdownOldWorkers(ctx context.Context, hostsToShutDown map[str
250250
var md *sources.SourceConn
251251
var dbRemovedFromConfig bool
252252
var metricRemovedFromPreset bool
253-
splits := strings.Split(dbMetric, dbMetricJoinStr)
254-
db := splits[0]
255-
metric := splits[1]
253+
db, metric, _ := strings.Cut(dbMetric, dbMetricJoinStr)
256254

257255
_, wholeDbShutDown := hostsToShutDown[db]
258256
if !wholeDbShutDown {

0 commit comments

Comments
 (0)