"ws(...).close" takes 60 seconds?

15 views
Skip to first unread message

Pouria

unread,
Jan 10, 2018, 11:38:43 PM1/10/18
to Gatling User Group
Hi All,

I have a simple scenario:

def openAndCloseWebsocket(authToken: String) = scenario("Open and close a websocket connection")
  .exec (
    ws("acquire a websocket")
      .open("/subscription")
      .queryParam("auth", authToken)
  )
  .exec(
    ws("Send msg")
      .sendText(pingJson)
      .check(wsAwait.within(5).until(1).regex(".*Pong.*"))
  )
  .exec(
    ws("close the websocket").close
  )



The scenario works fine and passes, except for the fact that closing the websocket takes 60 seconds every time. In fact, if I remove the very last `exec` (i.e. don't close the socket), the scenario ends much more quickly. Still, I prefer to close the socket once I'm done with it.

Is this a gatling bug, or am I doing something wrong?

Cheers,
Pouria


Stéphane LANDELLE

unread,
Jan 11, 2018, 3:41:10 AM1/11/18
to gat...@googlegroups.com
Hi,

I tried to reproduce against the echo sample from websocket.org but everything works just fine.
Could be something weird with your WebSocket server implementation.
Impossible to investigate without you providing a full actionable reproducer.

Regards,

Stéphane Landelle
GatlingCorp CEO


The information contained in this e-mail message and any accompanying files is or may be confidential. If you are not the intended recipient, any use, dissemination, reliance, forwarding, printing or copying of this e-mail or any attached files is unauthorised. This e-mail is subject to copyright. No part of it should be reproduced, adapted or communicated without the written consent of the copyright owner. If you have received this e-mail in error please advise the sender immediately by return e-mail or telephone and delete all copies. Fairfax Media does not guarantee the accuracy or completeness of any information contained in this e-mail or attached files. Internet communications are not secure, therefore Fairfax Media does not accept legal responsibility for the contents of this message or attached files.

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages