mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
Fix sync benchmark for latest test changes
This commit is contained in:
parent
3b3aa94c4e
commit
8b66472949
@ -35,14 +35,17 @@ func TestBenchmarkTransfer(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
expected := directoryContents("s1")
|
||||
expected, err := directoryContents("s1")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
log.Println("Starting sender...")
|
||||
sender := syncthingProcess{ // id1
|
||||
log: "1.out",
|
||||
argv: []string{"-home", "h1"},
|
||||
port: 8081,
|
||||
apiKey: apiKey,
|
||||
instance: "1",
|
||||
argv: []string{"-home", "h1"},
|
||||
port: 8081,
|
||||
apiKey: apiKey,
|
||||
}
|
||||
err = sender.start()
|
||||
if err != nil {
|
||||
@ -54,10 +57,10 @@ func TestBenchmarkTransfer(t *testing.T) {
|
||||
|
||||
log.Println("Starting receiver...")
|
||||
receiver := syncthingProcess{ // id2
|
||||
log: "2.out",
|
||||
argv: []string{"-home", "h2"},
|
||||
port: 8082,
|
||||
apiKey: apiKey,
|
||||
instance: "2",
|
||||
argv: []string{"-home", "h2"},
|
||||
port: 8082,
|
||||
apiKey: apiKey,
|
||||
}
|
||||
err = receiver.start()
|
||||
if err != nil {
|
||||
@ -104,7 +107,10 @@ loop:
|
||||
|
||||
log.Println("Verifying...")
|
||||
|
||||
actual := directoryContents("s2")
|
||||
actual, err := directoryContents("s2")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = compareDirectoryContents(actual, expected)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user