Skip to content

Commit

Permalink
Cleanup test
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklove committed Nov 6, 2020
1 parent 0087e84 commit 29e547b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg/repository/store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import (
"fmt"
"io/ioutil"
"os"
"path"
"testing"
"time"

"github.com/pingcap/tiup/pkg/repository/v1manifest"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -91,8 +89,6 @@ func TestConflict(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, uint(9527), m.Signed.(*v1manifest.Timestamp).Meta["test"].Length)

time.Sleep(3 * time.Second)

err = txn2.WriteManifest("test.json", test)
assert.Nil(t, err)
m, err = txn2.ReadManifest("test.json", &v1manifest.Timestamp{})
Expand All @@ -102,15 +98,8 @@ func TestConflict(t *testing.T) {
err = txn1.Commit()
assert.Nil(t, err)

time.Sleep(3 * time.Second)
fi, err = os.Stat(path.Join(root, "test.json"))
assert.Nil(t, err)
fmt.Println("txn1 commit", fi.ModTime().UnixNano())

err = txn2.Commit()
assert.NotNil(t, err)

t.Fail()
}

func TestUpstream(t *testing.T) {
Expand Down

0 comments on commit 29e547b

Please sign in to comment.