Forced Pause?

Suppose I have a scenario where pauses are disabled, e.g. setUp(…).pauses( disabledPauses )

Is it possible to embed a pause that defies that setting? A pause that pauses anyway?

No

I had a feeling.

Guess I can’t use disabledPauses. :stuck_out_tongue:

Could you explain what you’re trying to do, please?

It relates to the other thread about single-file logins.

`
object Login {
val loginAllowed = new AtomicBoolean( true )

val singleFile =
asLongAs( session => loginAllowed.compareAndSet( true, false ) == false ) {
pause( 1 )
}

`

The pause in singleFile won’t work if disabledPauses is used. So, I modified my other pauses to be conditional, for now.

The global disabling of pauses is great for making scenarios go as fast as they can. But then you can’t write code like this, where a pause is needed unconditionally. But I don’t know how often something like this is actually needed. So I don’t know if you want to worry about supporting an unconditional pause. It would be easy enough to implement, but is it worth it? I can’t say.

It makes sense.
Could you open a feature request, please?

Hope I did it right. Added an “issue” to the Git repository.