瀏覽代碼

test, lib/rc: Integration test fixes and polish (#5488)

Simon Frei 6 年之前
父節點
當前提交
657be162dd
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 1 2
      lib/rc/rc.go
  2. 2 2
      test/override_test.go

+ 1 - 2
lib/rc/rc.go

@@ -126,12 +126,10 @@ func (p *Process) wait() {
 // AwaitStartup waits for the Syncthing process to start and perform initial
 // scans of all folders.
 func (p *Process) AwaitStartup() {
-	fmt.Println("awaiting startup")
 	select {
 	case <-p.startComplete:
 	case <-p.stopped:
 	}
-	fmt.Println("awaited startup")
 }
 
 // Stop stops the running Syncthing process. If the process was logging to a
@@ -320,6 +318,7 @@ func InSync(folder string, ps ...*Process) bool {
 		// If our latest FolderSummary didn't report 100%, then we are not done.
 
 		if !ps[i].done[folder] {
+			l.Debugf("done = ps[%d].done[%q] = false", i, folder)
 			return false
 		}
 

+ 2 - 2
test/override_test.go

@@ -28,8 +28,8 @@ func TestOverride(t *testing.T) {
 	fld := cfg.Folders()["default"]
 	fld.Type = config.FolderTypeSendOnly
 	cfg.SetFolder(fld)
-	t.Log(os.Rename("h1/config.xml", "h1/config.xml.orig"))
-	defer t.Log(os.Rename("h1/config.xml.orig", "h1/config.xml"))
+	os.Rename("h1/config.xml", "h1/config.xml.orig")
+	defer os.Rename("h1/config.xml.orig", "h1/config.xml")
 	cfg.Save()
 
 	log.Println("Cleaning...")