From 39c7abe656eb24e447bdbc1901006125f326c484 Mon Sep 17 00:00:00 2001 From: Tenest Hui Tang Date: Tue, 17 Dec 2024 16:19:12 -0500 Subject: [PATCH] qa: what is time --- go/src/hello_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/go/src/hello_test.go b/go/src/hello_test.go index 3a7fc4382..06db72316 100644 --- a/go/src/hello_test.go +++ b/go/src/hello_test.go @@ -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) + } +}