mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14106 from SimFG/remove_case
wal: remove the repeated test case
This commit is contained in:
commit
71bba3c761
@ -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:
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user