mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Fixup integration tests for race detector
This commit is contained in:
parent
42b8dafafe
commit
367e50edab
2
build.sh
2
build.sh
@ -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'
|
||||
;;
|
||||
|
||||
*)
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user