Skip to content

Commit

Permalink
fix: fix ut data race (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH authored Jan 16, 2025
1 parent 0407dd8 commit 03e1c4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions service/status_serivce_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build !race
// +build !race

package service_test

import (
Expand Down
8 changes: 5 additions & 3 deletions test/service/rauc_online_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ func TestRAUCServer(t *testing.T) {
releasePath, err := installerServer.DownloadRelease(ctx, *release, false)
parentDir := filepath.Dir(releasePath)

// err may be "download fail"
if assert.Contains(t, err.Error(), "download fail") {
t.SkipNow()
if err != nil {
// err may be "download fail"
if assert.Contains(t, err.Error(), "download fail") {
t.SkipNow()
}
}

assert.NoError(t, err)
Expand Down

0 comments on commit 03e1c4e

Please # to comment.