Skip to content

Commit

Permalink
fixup! chore: autofix corrupted job-status stats
Browse files Browse the repository at this point in the history
  • Loading branch information
atzoum committed Dec 11, 2023
1 parent eec2f8c commit 3f6e02a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion services/rsources/rsources.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func (js *JobStatus) FixCorruptedStats(log logger.Logger) {
log.Warnw("Corrupted job status stats detected, fixing", "job_status", string(corruptedJson))
fixCorrupted()
}

}

type TaskStatus struct {
Expand Down
5 changes: 2 additions & 3 deletions services/rsources/rsources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package rsources_test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/rudderlabs/rudder-go-kit/logger"
"github.com/rudderlabs/rudder-server/services/rsources"
"github.com/stretchr/testify/require"
)

func TestCorruptedJobStatus(t *testing.T) {

t.Run("Corrupted Source Stats", func(t *testing.T) {
js := rsources.JobStatus{
ID: "job-id",
Expand Down Expand Up @@ -187,5 +187,4 @@ func TestCorruptedJobStatus(t *testing.T) {
require.EqualValues(t, 1, js.TasksStatus[0].SourcesStatus[0].DestinationsStatus[0].Stats.Out)
require.EqualValues(t, 0, js.TasksStatus[0].SourcesStatus[0].DestinationsStatus[0].Stats.Failed)
})

}

0 comments on commit 3f6e02a

Please sign in to comment.