Skip to content

Commit

Permalink
GOCBC-912: Add time units to expiry in bulk ops tests
Browse files Browse the repository at this point in the history
Motivation
-----------
The bulk operations tests sometimes fail against the mock, this
could be because we set expiry on docs that we create to 20ns.

Changes
-------
Update the tests to run with expiry of 20s rather than 20ns.

Change-Id: I1cbb1520ffa0aeb3b0fb2026b99b0b1f2217e4e8
Reviewed-on: http://review.couchbase.org/c/gocb/+/129797
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Charles Dixon <chvckd@gmail.com>
  • Loading branch information
chvck committed Jun 8, 2020
1 parent a9548ee commit 93416ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions collection_bulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gocb

import (
"fmt"
"time"
)

func (suite *IntegrationTestSuite) TestUpsertGetBulk() {
Expand All @@ -12,7 +13,7 @@ func (suite *IntegrationTestSuite) TestUpsertGetBulk() {
ops = append(ops, &UpsertOp{
ID: fmt.Sprintf("%d", i),
Value: "test",
Expiry: 20,
Expiry: 20 * time.Second,
})
}

Expand Down Expand Up @@ -81,7 +82,7 @@ func (suite *IntegrationTestSuite) TestInsertDocsBulk() {
ops = append(ops, &InsertOp{
ID: fmt.Sprintf("insert-docs-bulk-%d", i),
Value: "test",
Expiry: 20,
Expiry: 20 * time.Second,
})
}

Expand Down Expand Up @@ -111,7 +112,7 @@ func (suite *IntegrationTestSuite) TestReplaceOperationBulk() {
ops = append(ops, &UpsertOp{
ID: fmt.Sprintf("replace-docs-bulk-%d", i),
Value: "test",
Expiry: 20,
Expiry: 20 * time.Second,
})
}

Expand Down Expand Up @@ -165,7 +166,7 @@ func (suite *IntegrationTestSuite) TestRemoveOperationBulk() {
ops = append(ops, &UpsertOp{
ID: fmt.Sprintf("remove-docs-bulk-%d", i),
Value: "test",
Expiry: 20,
Expiry: 20 * time.Second,
})
}

Expand Down

0 comments on commit 93416ed

Please sign in to comment.