Skip to content

Commit

Permalink
test: add TestStartMultipleTimes
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <[email protected]>
  • Loading branch information
dwisiswant0 committed Aug 7, 2024
1 parent e0bf9d2 commit 82c5091
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions clistats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,16 @@ func TestDynamicCallback_Elapsedtime(t *testing.T) {
elapsed := time.Since(startTime).Seconds()
require.True(t, elapsed > 0)
}

func TestStartMultipleTimes(t *testing.T) {
client, err := New()
require.Nil(t, err)

for i := 1; i <= 2; i++ {
err = client.Start()
require.Nil(t, err)

err = client.Stop()
require.Nil(t, err)
}
}

0 comments on commit 82c5091

Please sign in to comment.