Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cassandra plugin - batch doesn't return promise #520

Closed
cohesivejones opened this issue Apr 5, 2019 · 0 comments · Fixed by #525
Closed

cassandra plugin - batch doesn't return promise #520

cohesivejones opened this issue Apr 5, 2019 · 0 comments · Fixed by #525
Labels
bug Something isn't working community integrations
Milestone

Comments

@cohesivejones
Copy link

cohesivejones commented Apr 5, 2019

I just tried to add dd-trace@v0.10.3 to my project and experienced the following error while calling a batch on the Cassandra client, returns error can't call then on undefined

The following test should expose the issue:

        it('should support batch queries with a promise', done => {
          const id = '1234'
          const queries = [
            { query: 'INSERT INTO test.test (id) VALUES (?)', params: [id] },
            `UPDATE test.test SET test='test' WHERE id='${id}';`
          ]

          agent
            .use(traces => {
              expect(traces[0][0]).to.have.property('resource', `${queries[0].query}; ${queries[1]}`)
            })
            .catch(done)

          client.batch(queries, { prepare: true }).then(done);
        })

Dependencies:

cassandra-driver: 3.5.0
dd-trace: 0.10.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community integrations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants