Skip to content

Commit

Permalink
Shorten the delay and test for sleep not causing vcpu time.
Browse files Browse the repository at this point in the history
  • Loading branch information
acw committed Aug 30, 2024
1 parent 22cbc93 commit 839b205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration_tests/compute_runtime/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ func TestGetVcpuMs(t *testing.T) {
t.Errorf("Couldn't get starting vcpu time")
}

time.Sleep(5 * time.Second)
time.Sleep(2 * time.Second)

end, err := compute.GetVCPUTime()
if err != nil {
t.Errorf("Couldn't get ending vcpu time")
}

if end - start > time.Second {
if end - start > (500 * time.Millisecond) {
t.Errorf("Sleeping shouldn't count as vcpu time!")
}

Expand Down

0 comments on commit 839b205

Please sign in to comment.