Skip to content

Commit

Permalink
skip TestMainSrvStart() for riscv64, #34.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwq committed Mar 20, 2024
1 parent a8a6d9a commit a657391
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions frontend/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"os"
"os/exec"
"reflect"
"runtime"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a657391

Please sign in to comment.