Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit b8b3f98

Browse files
committed
Debugging
1 parent 56ab5ed commit b8b3f98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/util/mongotester/mongotester.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func (m *Tester) connectivityCheck(shouldSucceed bool, opts ...OptionApplier) fu
245245
collection := m.mongoClient.Database(connectivityOpts.Database).Collection(connectivityOpts.Collection)
246246
_, err = collection.InsertOne(ctx, bson.M{"name": "pi", "value": 3.14159})
247247
if err != nil && shouldSucceed {
248-
t.Logf("Was not able to connect, when we should have been able to!")
248+
t.Logf("Was not able to connect, when we should have been able to! Error: %v", err)
249249
return false, nil
250250
}
251251
if err == nil && !shouldSucceed {
@@ -303,9 +303,13 @@ func (m *Tester) EnsureMongodConfig(selector string, expected interface{}) func(
303303
connectivityOpts := defaults()
304304
err := wait.PollUntilContextTimeout(m.ctx, connectivityOpts.IntervalTime, connectivityOpts.TimeoutTime, false, func(ctx context.Context) (done bool, err error) {
305305
opts, err := m.getCommandLineOptions()
306+
fmt.Printf("Debugging: Unparsed options: %v, error: %v\n", opts, err)
306307
assert.NoError(t, err)
307308

308309
parsed := objx.New(bsonToMap(opts)).Get("parsed").ObjxMap()
310+
fmt.Printf("Debugging: parsed: %v, %v\n", parsed, reflect.TypeOf(parsed))
311+
fmt.Printf("Debugging: expected: %vm %v\n", expected, reflect.TypeOf(parsed))
312+
fmt.Printf("Debugging: selected: %vm %v\n", parsed.Get(selector).Data(), reflect.TypeOf(parsed.Get(selector).Data()))
309313

310314
return expected == parsed.Get(selector).Data(), nil
311315
})

0 commit comments

Comments
 (0)