GithubHelp home page GithubHelp logo

tobi hangs about tobi HOT 10 OPEN

learnboost avatar learnboost commented on August 30, 2024
tobi hangs

from tobi.

Comments (10)

tj avatar tj commented on August 30, 2024

do you app.close() at some point?

from tobi.

sebs avatar sebs commented on August 30, 2024

No, I dont. ;) Should I do that in the tests? ;)
(Captain Obvious again kicked me in the butt)

from tobi.

tj avatar tj commented on August 30, 2024

:) unlike assert.response() no effort is made to auto-close the server since it is not uncommon to nest requests

from tobi.

kvz avatar kvz commented on August 30, 2024

I'm running tobi against a remote website, so without app.
All tests pass but the process remains open for me as well. How should I close it in my case?

from tobi.

tj avatar tj commented on August 30, 2024

you can access the http client via browser.client so you can call close() etc when you are done

from tobi.

kvz avatar kvz commented on August 30, 2024

Thanks : )
I found that for servers that set the Transfer-Encoding: chunked header, a

browser.client.end()

will not do anything. On other servers it works as expected.
For now I think I can just

process.exit(0)

but It'd be cool if there was a nicer way to achieve this.

from tobi.

timoxley avatar timoxley commented on August 30, 2024

+1 for "nicer way to achieve this"

also browser.client no longer exists, is there perhaps something else I can try? Mainly cause I can't use process.exit() from within a nodeunit test without it complaining.

from tobi.

tj avatar tj commented on August 30, 2024

I cant think of a nicer way to deal with this sort of thing. If you're not nesting requests it's possible to just use a number to count the pending requests and auto-close the server, which is what I do with assert.response(), however Tobi stuff is almost always nested so that does not work. I'm making sure that with my Expresso successor that the test framework explicitly exit()s to prevent this sort of headache

from tobi.

timoxley avatar timoxley commented on August 30, 2024

I'm interested as to what is actually preventing the process from quitting?

from tobi.

tj avatar tj commented on August 30, 2024

the server is still listening for connections

from tobi.

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.