Skip to content

Commit 47dbb26

Browse files
authored
Flaky test TestClient/Close/AllowImplicitSessions fix (#1870)
1 parent f20d1b3 commit 47dbb26

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

internal/query/client.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -704,11 +704,13 @@ func createImplicitSessionPool(ctx context.Context,
704704
pool.WithLimit[*Session](cfg.PoolLimit()),
705705
pool.WithTrace[*Session](poolTrace(cfg.Trace())),
706706
pool.WithCreateItemFunc(func(ctx context.Context) (_ *Session, err error) {
707-
core := &sessionCore{
708-
cc: cc,
709-
Client: c,
710-
Trace: cfg.Trace(),
711-
done: make(chan struct{}),
707+
core := &implicitSessionCore{
708+
sessionCore{
709+
cc: cc,
710+
Client: c,
711+
Trace: cfg.Trace(),
712+
done: make(chan struct{}),
713+
},
712714
}
713715

714716
return &Session{
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package query
2+
3+
import "context"
4+
5+
type implicitSessionCore struct {
6+
sessionCore
7+
}
8+
9+
func (s *implicitSessionCore) Close(context.Context) error {
10+
return nil
11+
}

0 commit comments

Comments
 (0)