Giter Club home page Giter Club logo

Comments (6)

Tieske avatar Tieske commented on June 3, 2024

+1

a potential use could be async testing, but that would a whole different thing than the current use of coroutines. Busted does not have a scheduler to run the different coroutines, hence its sequential and hence slower (and in current code, as a side effect, it runs the wrong order).

from busted.

ajacksified avatar ajacksified commented on June 3, 2024

We need to add a mechanism for async testing, to handle things like testing web requests, database connections, etc for integration testing. We'll accomplish this separately from the threading issue, since this will be per-test rather than per-file. I assume we'll use coroutines for that.

from busted.

DorianGray avatar DorianGray commented on June 3, 2024

Coroutines were implemented as a placeholder for lualanes. I want each file to run in a separate thread eventually, for now I just broke it out at the describe block level. It forced me to decouple the test runner and make it async.

from busted.

kikito avatar kikito commented on June 3, 2024

It forced me to decouple the test runner and make it async.

Probably you didn't mean that exactly. In (vanilla) Lua you can't have async things. It's a sync language, coroutines included.

If coroutines they are an "experimental stand-in" for lualanes, I would recommend moving them to an "experimentation branch" - leave master as simple as possible (i.e. tables and functions) until the Lualanes implementation is ready.

In any case, the reason is explained, so I consider this issue closed.

from busted.

Tieske avatar Tieske commented on June 3, 2024

Probably you didn't mean that exactly. In (vanilla) Lua you can't have async things. It's a sync language, coroutines included.

If strictly sticking to unit tests, you're right. But there are many libraries that do async stuff, usually they are the ones implementing main-loops. Copas as a socket scheduler for example, or any app using QT. For those you might want an async test.

from busted.

DorianGray avatar DorianGray commented on June 3, 2024

Also, being able to have a maximum execution time on tests is nice, for performance testing. Threads give us that, and that's valuable for single threaded apps as well.

from busted.

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.