|
|
@@ -24,13 +24,6 @@ var env = []string{
|
|
|
"STTRACE=model",
|
|
|
}
|
|
|
|
|
|
-func TestRestartBothDuringTransfer(t *testing.T) {
|
|
|
- // Give the receiver some time to rot with needed files but
|
|
|
- // without any peer. This triggers
|
|
|
- // https://github.com/syncthing/syncthing/issues/463
|
|
|
- testRestartDuringTransfer(t, true, true, 10*time.Second, 0)
|
|
|
-}
|
|
|
-
|
|
|
func TestRestartReceiverDuringTransfer(t *testing.T) {
|
|
|
testRestartDuringTransfer(t, false, true, 0, 0)
|
|
|
}
|
|
|
@@ -39,6 +32,13 @@ func TestRestartSenderDuringTransfer(t *testing.T) {
|
|
|
testRestartDuringTransfer(t, true, false, 0, 0)
|
|
|
}
|
|
|
|
|
|
+func TestRestartSenderAndReceiverDuringTransfer(t *testing.T) {
|
|
|
+ // // Give the receiver some time to rot with needed files but
|
|
|
+ // // without any peer. This triggers
|
|
|
+ // // https://github.com/syncthing/syncthing/issues/463
|
|
|
+ testRestartDuringTransfer(t, true, true, 10*time.Second, 0)
|
|
|
+}
|
|
|
+
|
|
|
func testRestartDuringTransfer(t *testing.T, restartSender, restartReceiver bool, senderDelay, receiverDelay time.Duration) {
|
|
|
log.Println("Cleaning...")
|
|
|
err := removeAll("s1", "s2", "f1/index", "f2/index")
|
|
|
@@ -134,6 +134,9 @@ func testRestartDuringTransfer(t *testing.T, restartSender, restartReceiver bool
|
|
|
time.Sleep(1 * time.Second)
|
|
|
}
|
|
|
|
|
|
+ sender.stop()
|
|
|
+ receiver.stop()
|
|
|
+
|
|
|
log.Println("Comparing directories...")
|
|
|
err = compareDirectories("s1", "s2")
|
|
|
if err != nil {
|