mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
test, lib/rc: Integration test fixes and polish (#5488)
This commit is contained in:
parent
8815ef922b
commit
657be162dd
@ -126,12 +126,10 @@ func (p *Process) wait() {
|
|||||||
// AwaitStartup waits for the Syncthing process to start and perform initial
|
// AwaitStartup waits for the Syncthing process to start and perform initial
|
||||||
// scans of all folders.
|
// scans of all folders.
|
||||||
func (p *Process) AwaitStartup() {
|
func (p *Process) AwaitStartup() {
|
||||||
fmt.Println("awaiting startup")
|
|
||||||
select {
|
select {
|
||||||
case <-p.startComplete:
|
case <-p.startComplete:
|
||||||
case <-p.stopped:
|
case <-p.stopped:
|
||||||
}
|
}
|
||||||
fmt.Println("awaited startup")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop stops the running Syncthing process. If the process was logging to a
|
// 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 our latest FolderSummary didn't report 100%, then we are not done.
|
||||||
|
|
||||||
if !ps[i].done[folder] {
|
if !ps[i].done[folder] {
|
||||||
|
l.Debugf("done = ps[%d].done[%q] = false", i, folder)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ func TestOverride(t *testing.T) {
|
|||||||
fld := cfg.Folders()["default"]
|
fld := cfg.Folders()["default"]
|
||||||
fld.Type = config.FolderTypeSendOnly
|
fld.Type = config.FolderTypeSendOnly
|
||||||
cfg.SetFolder(fld)
|
cfg.SetFolder(fld)
|
||||||
t.Log(os.Rename("h1/config.xml", "h1/config.xml.orig"))
|
os.Rename("h1/config.xml", "h1/config.xml.orig")
|
||||||
defer t.Log(os.Rename("h1/config.xml.orig", "h1/config.xml"))
|
defer os.Rename("h1/config.xml.orig", "h1/config.xml")
|
||||||
cfg.Save()
|
cfg.Save()
|
||||||
|
|
||||||
log.Println("Cleaning...")
|
log.Println("Cleaning...")
|
||||||
|
Loading…
Reference in New Issue
Block a user