locked
Help replicating SignalR longPolling communication in JMeter RRS feed

  • Question

  • User1185552069 posted

    Our web app was recently modified to use SignalR and I'm having trouble converting our existing JMeter tests to use this new form of communication.

    We have a hub with a few methods on it.

    After a /signalr/negotiate call where I get the connectionToken from the response, I successfully call /signalr/connect and then signalr/start. The connection seems to be live and I'm able to access the methods on the hub.

    The issue is that the connection seems to die on its own after a fixed period of time. The log looks something like this on the server:

    SignalR.Transports.TransportHeartBeat Information: 0 : Connection 4091160f-18ad-4683-88c5-2c458c1bc6a8 is New.
    SignalR.Transports.LongPollingTransport Verbose: 0 : DrainWrites(4091160f-18ad-4683-88c5-2c458c1bc6a8)
    SignalR.Transports.LongPollingTransport Information: 0 : CompleteRequest (4091160f-18ad-4683-88c5-2c458c1bc6a8)
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Verbose: 0 : 4091160f-18ad-4683-88c5-2c458c1bc6a8 is dead
    SignalR.Transports.TransportHeartBeat Information: 0 : Removing connection 4091160f-18ad-4683-88c5-2c458c1bc6a8
    SignalR.Transports.LongPollingTransport Information: 0 : Abort(4091160f-18ad-4683-88c5-2c458c1bc6a8)
    SignalR.Transports.LongPollingTransport Information: 0 : End(4091160f-18ad-4683-88c5-2c458c1bc6a8)

    With a normal connection using IE, the log looks like this:

    SignalR.Transports.TransportHeartBeat Information: 0 : Connection 4e388658-ebab-452b-9dd6-6dab7e39e675 is New.
    SignalR.Transports.LongPollingTransport Verbose: 0 : DrainWrites(4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.LongPollingTransport Information: 0 : CompleteRequest (4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.TransportHeartBeat Verbose: 0 : Connection 4e388658-ebab-452b-9dd6-6dab7e39e675 exists. Closing previous connection.
    SignalR.Transports.LongPollingTransport Information: 0 : End(4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.LongPollingTransport Verbose: 0 : DrainWrites(4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.LongPollingTransport Information: 0 : CompleteRequest (4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.TransportHeartBeat Verbose: 0 : Connection 4e388658-ebab-452b-9dd6-6dab7e39e675 exists. Closing previous connection.
    SignalR.Transports.LongPollingTransport Information: 0 : End(4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.LongPollingTransport Verbose: 0 : DrainWrites(4e388658-ebab-452b-9dd6-6dab7e39e675)
    SignalR.Transports.LongPollingTransport Information: 0 : CompleteRequest (4e388658-ebab-452b-9dd6-6dab7e39e675)

    What am I missing in my JMeter tests to keep the connection alive? Do I need to /signalr/poll requests after each /signalr/send?

    Tuesday, March 22, 2016 9:48 PM

Answers