Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
package golib/sfxclient currently is taking close to 30s for running
all test cases. This fix will reduce the testing time to ~4s.

Other packages have minor tune ups reducing testing time in order of
milliseconds.

There is no test case for golib/trace/format as it is auto-generated code
and golib/logkey as it contains only global variables. So removing both the
packages from go list output in travis.yml file.

golib doesn't use t.Parallel in any of the test suites and hence -parallel flag
is removed from go test arguments list
  • Loading branch information
jgheewala committed Sep 27, 2021
1 parent 875485c commit 581c166
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 204 deletions.
9 changes: 6 additions & 3 deletions distconf/zk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ func TestZkConf(t *testing.T) {

DefaultLogger.Log("Doing write 3")
assert.NoError(t, z.Write("TestZkConf", nil))
select {
case res = <-signalChan:
case <-time.After(time.Second * 3):
for res != "TestZkConf" {
select {
case res = <-signalChan:
default:
runtime.Gosched()
}
}
assert.Equal(t, "TestZkConf", res)
}
Expand Down
Loading

0 comments on commit 581c166

Please sign in to comment.