package helpers
import "go.mongodb.org/mongo-driver/internal/testutil/helpers"
Index ¶
- func AssertSoon(t testing.TB, callback func(ctx context.Context), timeout time.Duration)
- func FindJSONFilesInDir(t *testing.T, dir string) []string
- func RawToDocuments(doc bson.Raw) []bson.Raw
- func RawToInterfaces(docs ...bson.Raw) []interface{}
Functions ¶
func AssertSoon ¶
AssertSoon runs the provided callback and fails the passed-in test if the callback does not complete within timeout. The provided callback should respect the passed-in context and cease execution when it has expired.
Deprecated: This function will be removed with GODRIVER-2667, use assert.Eventually instead.
func FindJSONFilesInDir ¶
FindJSONFilesInDir finds the JSON files in a directory.
func RawToDocuments ¶
RawToDocuments converts a bson.Raw that is internally an array of documents to []bson.Raw.
func RawToInterfaces ¶
RawToInterfaces takes one or many bson.Raw documents and returns them as a []interface{}.
Source Files ¶
helpers.go
- Version
- v1.12.0
- Published
- Jun 21, 2023
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 48 seconds ago –
Tools for package owners.