Ver código fonte

test: Unflake symlink/scan tests

Jakob Borg 8 anos atrás
pai
commit
d8a0a477ca
3 arquivos alterados com 10 adições e 2 exclusões
  1. 1 1
      test/h3/config.xml
  2. 6 1
      test/scan_test.go
  3. 3 0
      test/symlink_test.go

+ 1 - 1
test/h3/config.xml

@@ -79,7 +79,7 @@
         <natTimeoutSeconds>10</natTimeoutSeconds>
         <urAccepted>-1</urAccepted>
         <urSeen>2</urSeen>
-        <urUniqueID></urUniqueID>
+        <urUniqueID>UL4yowgK</urUniqueID>
         <urURL>https://data.syncthing.net/newdata</urURL>
         <urPostInsecurely>false</urPostInsecurely>
         <urInitialDelayS>1800</urInitialDelayS>

+ 6 - 1
test/scan_test.go

@@ -16,7 +16,7 @@ import (
 	"github.com/syncthing/syncthing/lib/rc"
 )
 
-func TestSubScan(t *testing.T) {
+func TestScanSubdir(t *testing.T) {
 	log.Println("Cleaning...")
 	err := removeAll("s1", "s2", "h1/index*", "h2/index*")
 	if err != nil {
@@ -40,8 +40,13 @@ func TestSubScan(t *testing.T) {
 	// Verify that the files and directories sync to the other side
 	sender := startInstance(t, 1)
 	defer checkedStop(t, sender)
+
 	receiver := startInstance(t, 2)
 	defer checkedStop(t, receiver)
+
+	sender.ResumeAll()
+	receiver.ResumeAll()
+
 	log.Println("Syncing...")
 	rc.AwaitSync("default", sender, receiver)
 

+ 3 - 0
test/symlink_test.go

@@ -158,6 +158,9 @@ func testSymlinks(t *testing.T) {
 	receiver := startInstance(t, 2)
 	defer checkedStop(t, receiver)
 
+	sender.ResumeAll()
+	receiver.ResumeAll()
+
 	log.Println("Syncing...")
 	rc.AwaitSync("default", sender, receiver)