Hi,
I have defined a loop which is supposed to end once the current time is greater than a predefined value.
Before scenario:
val proposedEndTime = System.currentTimeMillis + (1601000)
Inside scenario:
.asLongAs(proposedEndTime > System.currentTimeMillis) {
pause(1)
.group(“ChatMessage”){
exec(session => session.set(“sentOnTime”, System.currentTimeMillis))
.exec(ws(“ActualChatMessage”).sendText("""{“messageType”: “newChatMessage”, “you”: “${currentUser}”, “thirdParty”: “${currentThirdParty}”,
“sendTime”: “${sentOnTime}”, “message”: “Hello”}""")
.check(wsAwait.within(10).until(1).regex("""{.“messageType”:“newChatMessage”,“you”:"${currentUser}",“thirdParty”:"${currentUser}",“message”:"",“wasSentOn”:"${sentOnTime}",“communicationWith”:"${currentThirdParty}".}""")))
}
}
The problem is that the loop is never stopping, as if there is no condition. Do you have some ideas of what may be the problem?
Thanks a lot.
Jamie Tabone