Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fluky test #757

Merged
merged 3 commits into from
Jun 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
WIP
  • Loading branch information
AlekSi committed Jun 21, 2022
commit fc3c89fe7849a6a36147fe5c8952d3500be418e7
8 changes: 4 additions & 4 deletions integration/commands_administration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,10 @@ func TestCommandsAdministrationServerStatus(t *testing.T) {
assert.Regexp(t, `^5\.0\.`, must.NotFail(doc.Get("version")))
assert.NotEmpty(t, must.NotFail(doc.Get("process")))

assert.InDelta(t, float64(1), must.NotFail(doc.Get("pid")), 5_000_000)
assert.InDelta(t, float64(0), must.NotFail(doc.Get("uptime")), 600)
assert.InDelta(t, float64(0), must.NotFail(doc.Get("uptimeMillis")), 600_000)
assert.InDelta(t, float64(0), must.NotFail(doc.Get("uptimeEstimate")), 6000)
assert.GreaterOrEqual(t, must.NotFail(doc.Get("pid")), int64(1))
assert.GreaterOrEqual(t, must.NotFail(doc.Get("uptime")), float64(0))
assert.GreaterOrEqual(t, must.NotFail(doc.Get("uptimeMillis")), int64(0))
assert.GreaterOrEqual(t, must.NotFail(doc.Get("uptimeEstimate")), int64(0))

expectedLocalTime := ConvertDocument(t, bson.D{{"localTime", primitive.NewDateTimeFromTime(time.Now())}})
testutil.CompareAndSetByPathTime(t, expectedLocalTime, doc, time.Duration(2*time.Second), types.NewPathFromString("localTime"))
Expand Down