diff --git a/frontend/server/server.go b/frontend/server/server.go index 3ff9c4f1..a835a302 100644 --- a/frontend/server/server.go +++ b/frontend/server/server.go @@ -783,7 +783,7 @@ func (m *mainSrv) startChild(req string, addr *net.UDPAddr, conf2 Config) { // }(&conf2, m.exChan, m.whChan) // timeout read key from worker - timer := time.NewTimer(time.Duration(140) * time.Millisecond) + timer := time.NewTimer(time.Duration(145) * time.Millisecond) select { case <-timer.C: delete(m.workers, p) // clear failed worker diff --git a/frontend/server/server_test.go b/frontend/server/server_test.go index 90966518..5b0db45b 100644 --- a/frontend/server/server_test.go +++ b/frontend/server/server_test.go @@ -14,6 +14,7 @@ import ( "os" "os/exec" "reflect" + "runtime" "strconv" "strings" "sync" @@ -707,6 +708,9 @@ func TestMainSrvStart(t *testing.T) { }, } + if runtime.GOARCH == "riscv64" { + t.Skip("riscv64 timer is not as accurate as other platform, skip this test.") + } // the test start child process, which is /usr/bin/apshd // which means you need to compile /usr/bin/apshd before test for _, v := range tc {