Git Product home page Git Product logo

Comments (14)

hassy avatar hassy commented on June 11, 2024 2

Fixed in master, new release on its way.

from artillery-core.

hassy avatar hassy commented on June 11, 2024 1

Sounds like a bug @BerendWeij! Thanks for the report!

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

Weird thing. If you add:

socketio:
      query: 'token={"key":value}'

you will see the query being part of the second handshake, and not the first.

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

Commenting on my own issue, nice :)

I think it has to do with the methods:

  • loadContextSocket (which adds the query to the options)

  • compile (which does not add the query to the options)

They both have a io.connect()

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

The issue with the query object is solved with this pull request: #170

The double connecting is still occurring unfortunately.

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

I think it is an issue with the namespace.
In the method loadContextSocket, there is a lookup
if(!context.sockets[namespace]) {
If it cannot find a socket, it creates a new one. Which should not be the case with my example code.

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

@hassy what would be the easiest way to test changes to artillery-core? I am willing to dive into this issue today when possible. I can find information about the contribution rules, but not about the installation steps.
Best regards!

from artillery-core.

hassy avatar hassy commented on June 11, 2024

@BerendWeij clone artillery and artillery-core repos, then point lib/dispatcher.js (https://github.com/shoreditch-ops/artillery/blob/master/lib/dispatcher.js) to your local artillery-core, npm install in both directories, and you're good to go!

from artillery-core.

hassy avatar hassy commented on June 11, 2024

and thanks for taking a look!

from artillery-core.

BerendWeij avatar BerendWeij commented on June 11, 2024

Awesome! Thanks for the quick reply. I will keep you posted.

from artillery-core.

dhakan avatar dhakan commented on June 11, 2024

Any news on this? I'm using artillery 1.6.0-4 and am facing issues with the client connecting twice. This seems to happen only if I define an emit inside of the flow block. Example below:

{
  "config": {
    "target": "http://localhost:3000",
    "phases": [
      {
        "duration": 1,
        "arrivalRate": 1
      }
    ]
  },
  "scenarios": [
    {
      "engine": "socketio",
      "flow": [
        {
          "emit": {
            "channel": "client-loaded"
          }
        }
      ]
    }
  ]
}

This means that if I remove the json object literal inside of flow I get one connection only.

from artillery-core.

roeycohen avatar roeycohen commented on June 11, 2024

there's a problem with this fix.
if you only want to connect and not send anything, it won't connect.

from artillery-core.

hassy avatar hassy commented on June 11, 2024

Yep, cheers @roeycohen.

from artillery-core.

roeycohen avatar roeycohen commented on June 11, 2024

@hassy, but what if i only want to listen?

from artillery-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.