File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -301,12 +301,14 @@ func (p *AdvancedSessionPool) WithForceBlockGCSession(ctx context.Context, fn fu
301301 for ! infosync .StoreInternalSession (se .internal .sctx ) {
302302 // In most cases, the session manager is not set, so this step will be skipped.
303303 // It is only enabled explicitly in tests through a failpoint.
304- forceBlockGCInTest := ! intest .InTest
305- failpoint .Inject ("ForceBlockGCInTest" , func (val failpoint.Value ) {
306- forceBlockGCInTest = val .(bool )
307- })
308- if ! forceBlockGCInTest {
309- break
304+ if intest .InTest {
305+ forceBlockGCInTest := false
306+ failpoint .Inject ("ForceBlockGCInTest" , func (val failpoint.Value ) {
307+ forceBlockGCInTest = val .(bool )
308+ })
309+ if ! forceBlockGCInTest {
310+ break
311+ }
310312 }
311313
312314 // Check context cancellation
You can’t perform that action at this time.
0 commit comments