Merge pull request #14106 from SimFG/remove_case

wal: remove the repeated test case
This commit is contained in:
Marek Siarkowicz 2022-06-14 12:13:00 +02:00 committed by GitHub
commit 71bba3c761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -58,6 +58,7 @@ func newFilePipeline(lg *zap.Logger, dir string, fileSize int64) *filePipeline {
// Open returns a fresh file for writing. Rename the file before calling
// Open again or there will be file collisions.
// it will 'block' if the tmp file lock is already taken.
func (fp *filePipeline) Open() (f *fileutil.LockedFile, err error) {
select {
case f = <-fp.filec:

View File

@ -45,15 +45,3 @@ func TestFilePipelineFailPreallocate(t *testing.T) {
t.Fatal("expected error on invalid pre-allocate size, but no error")
}
}
func TestFilePipelineFailLockFile(t *testing.T) {
tdir := t.TempDir()
fp := newFilePipeline(zaptest.NewLogger(t), tdir, math.MaxInt64)
defer fp.Close()
f, ferr := fp.Open()
if f != nil || ferr == nil { // no such file or directory
t.Fatal("expected error on invalid pre-allocate size, but no error")
}
}