diff --git a/zapcore/write_syncer_test.go b/zapcore/write_syncer_test.go index 3172c58c0..b67230531 100644 --- a/zapcore/write_syncer_test.go +++ b/zapcore/write_syncer_test.go @@ -77,9 +77,8 @@ func TestCheckSync(t *testing.T) { t.SkipNow() return } - defer os.Remove(tmpFile.Name()) defer tmpFile.Close() - assert.True(t, checkSync(tmpFile), "Expected temp file to pass sync check") + assert.True(t, checkSync(tmpFile), "Expected os.Stderr to fail sync check") } func TestMultiWriteSyncerWritesBoth(t *testing.T) {