Skip to content

Commit

Permalink
qa: what is time
Browse files Browse the repository at this point in the history
  • Loading branch information
tenesttang-trunk committed Dec 17, 2024
1 parent 8507f68 commit 39c7abe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions go/src/hello_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,16 @@ func TimeIsNotReal(t *testing.T) {
time.Sleep(600 * time.Millisecond)
}
}

// passes if the current second is even
func TimeIsNotComplex(t *testing.T) {

currentTime := time.Now()
sec := currentTime.Second()

if sec%2 != 0 {
t.Errorf("Second '%d' is not even", sec)
// Sleep so retry cases can pass (sometimes)
time.Sleep(600 * time.Millisecond)
}
}

0 comments on commit 39c7abe

Please sign in to comment.