Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit365231b

Browse files
authored
fix(cli): scaletest: ignore errors syncing output (#13076)
1 parent74f2771 commit365231b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎cli/exp_scaletest.go‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"strconv"
1515
"strings"
1616
"sync"
17-
"syscall"
1817
"time"
1918

2019
"github.com/google/uuid"
@@ -245,14 +244,8 @@ func (o *scaleTestOutput) write(res harness.Results, stdout io.Writer) error {
245244

246245
// Sync the file to disk if it's a file.
247246
ifs,ok:=w.(interface{Sync()error });ok {
248-
err:=s.Sync()
249-
// On Linux, EINVAL is returned when calling fsync on /dev/stdout. We
250-
// can safely ignore this error.
251-
// On macOS, ENOTTY is returned when calling sync on /dev/stdout. We
252-
// can safely ignore this error.
253-
iferr!=nil&&!xerrors.Is(err,syscall.EINVAL)&&!xerrors.Is(err,syscall.ENOTTY) {
254-
returnxerrors.Errorf("flush output file: %w",err)
255-
}
247+
// Best effort. If we get an error from syncing, just ignore it.
248+
_=s.Sync()
256249
}
257250

258251
ifc!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp