Fixup integration tests for race detector

This commit is contained in:
Jakob Borg 2014-11-29 23:41:06 +01:00
parent 42b8dafafe
commit 367e50edab
7 changed files with 6 additions and 12 deletions

View File

@ -128,7 +128,7 @@ case "${1:-default}" in
&& go run build.go -race \
&& export GOPATH=$(pwd)/Godeps/_workspace:$GOPATH \
&& cd test \
&& go test -tags integration -v'
&& go test -tags integration -v -timeout 30m'
;;
*)

View File

@ -227,12 +227,6 @@ func (p *syncthingProcess) version() (string, error) {
return v.Version, nil
}
type fileGenerator struct {
files int
maxexp int
srcname string
}
func generateFiles(dir string, files, maxexp int, srcname string) error {
fd, err := os.Open(srcname)
if err != nil {

View File

@ -34,7 +34,7 @@ func TestFiletypeChange(t *testing.T) {
}
log.Println("Generating files...")
err = generateFiles("s1", 100, 20, "../bin/syncthing")
err = generateFiles("s1", 100, 20, "../LICENSE")
if err != nil {
t.Fatal(err)
}

View File

@ -38,7 +38,7 @@ func TestManyPeers(t *testing.T) {
}
log.Println("Generating files...")
err = generateFiles("s1", 200, 20, "../bin/syncthing")
err = generateFiles("s1", 200, 20, "../LICENSE")
if err != nil {
t.Fatal(err)
}

View File

@ -48,7 +48,7 @@ func testRestartDuringTransfer(t *testing.T, restartSender, restartReceiver bool
}
log.Println("Generating files...")
err = generateFiles("s1", 1000, 22, "../bin/syncthing")
err = generateFiles("s1", 1000, 22, "../LICENSE")
if err != nil {
t.Fatal(err)
}

View File

@ -35,7 +35,7 @@ func TestSymlinks(t *testing.T) {
}
log.Println("Generating files...")
err = generateFiles("s1", 100, 20, "../bin/syncthing")
err = generateFiles("s1", 100, 20, "../LICENSE")
if err != nil {
t.Fatal(err)
}

View File

@ -37,7 +37,7 @@ func TestBenchmarkTransfer(t *testing.T) {
}
log.Println("Generating files...")
err = generateFiles("s1", nfiles, 22, "../bin/syncthing")
err = generateFiles("s1", nfiles, 22, "../LICENSE")
if err != nil {
t.Fatal(err)
}