Unable to run a kafka consumer file using exec #21391
bijojoseph99
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to connect to the kafka server and fetch messages.
I have created a file called consumer.js and able to run the file from command line using "node consumer.js" and it fetches all the messages from the server.
I'm using cypress with Cucumber and trying to call the consumer.js file from my test step definition using the following code:
cy.log('Start Fetching.......................')
cy.exec('node ./cypress/integration/kafka/consumer.js', {failOnNonZeroExit: false})
.then((res) =>{
console.log(res)
})
.its('code')
.should('equal', 0)
cy.log('Finished Fetching.......................')
But I'm getting the following error from the command line:
Can someone help me with this please.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions