Code Monkey home page Code Monkey logo

Comments (11)

hoegertn avatar hoegertn commented on July 30, 2024

Can you post (parts of) the code? Maybe disable all test and reenable them one by one to find the one that does not terminate.

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn Apologies. I updated my post

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn I tried running only the "LaunchIntent" test, still experience the same behavior.

My node version is v9.0.0

package.json is

  "dependencies": {
    "alexa-sdk": "^1.0.12",
    "dotenv": "^4.0.0",
    "pg": "^7.4.0"
  },
  "devDependencies": {
    "alexa-skill-test-framework": "^1.1.2",
    "chai": "^4.1.2",
    "mocha": "^4.0.1"
  }

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn I disabled everything and left the initialize code. That was where the "stuck" happened

from alexa-skill-test-framework.

hoegertn avatar hoegertn commented on July 30, 2024

From your dependencies, I see, that you are using Postgres. Do you happen to open a connection pool, that is not closed?

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn Ah yes. I did not close it since the lambda function won't be able to connect to it again when I tried to asked Alexa to connect to the db again.

from alexa-skill-test-framework.

hoegertn avatar hoegertn commented on July 30, 2024

You can try to set context.callbackWaitsForEmptyEventLoop = false; in your handler function.

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn Before execution? What does it do if you don't mind me asking?

from alexa-skill-test-framework.

hoegertn avatar hoegertn commented on July 30, 2024

As the first line in your handler function.
It tells Lambda to not block until all things on the event loop are gone.

I am not sure if it helps with your test problem, but it will cause trouble on AWS Lambda if not set.

from alexa-skill-test-framework.

jhnferraris avatar jhnferraris commented on July 30, 2024

@hoegertn I tried it and it is still stuck. hmm

So the issue here is because of the postgres Client not getting closed after the tests are finished.

from alexa-skill-test-framework.

hoegertn avatar hoegertn commented on July 30, 2024

@jhnferraris did you solve this issue? Can we close this one or is it still needed?

from alexa-skill-test-framework.

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.