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

Option for running tests on same thread as output thread #103

Closed
chadaustin opened this issue Mar 19, 2015 · 3 comments
Closed

Option for running tests on same thread as output thread #103

chadaustin opened this issue Mar 19, 2015 · 3 comments

Comments

@chadaustin
Copy link

If you drop a putStrLn or traceM into the middle of a test, you'll get output like this:

  readFeed with real data: E n v e l o p e   { e I d   =   U r l   { u r l H e a d   =   F u l ly[u3a2l;i2f2imedO K"h[tmp"(3U2r;l2H2omst  ({0u.h0H2oss)tN[mme [ 3"2a;p2i2.mlo
ca[hmos t .riemavdu .pcaogmi"n,a tuehdP ofrete d=:  0 ,   u h U s e r N a m e   =   " " ,   u h P a s s w d   =   " " } ) ,   u rlPath = ["feed","feed-personal-10000"], urlQuery = Nothing, urlHash = Nothing}, ePrimary = EntityBody {eData = EntityData (Object (fromList [("type",String "personal")])), eRelations = fromList [("feed_elements",Url {urlHead = FullyQualified "http" (UrlHost {uhHostName = "api.localhost.imvu.com", uhPort = 0, uhUserName = "", uhPasswd = ""}), urlPath = ["feed","feed-personal-10000","elements"], urlQuery = Nothing, urlHash = Nothing}),("elements",Url {urlHead = FullyQualified "http" (UrlHost {uhHostName = "api.localhost.imvu.com", uhPort = 0, uhUserName = "", uhPasswd = ""}), urlPath = ["feed","feed-personal-10000","elements"], urlQuery = Nothing, urlHash = Nothing})], eUpdates = Nothing}, eDenormalized = fromList [(Url {urlHead = FullyQualified "http" (UrlHost {uhHostName = "api.localhost.imvu.com", uhPort = 0, uhUserName = "", uhPasswd = ""}), urlPath = ["feed","feed-personal-10000","elements"], urlQuery = Nothing, urlHash = Nothing},EntityBody {eData = EntityCollection 0 (fromList []), eRelations = fromList [], eUpdates = Just (ImqUpdateMount (QueueName {qnType = "feed-personal", qnId = "10000"}) (Edge "elements"))})]}

It would be rather convenient to have an option to have the test output and the test execution itself on the same thread.

@UnkindPartition
Copy link
Owner

I don't know of a way to do this which wouldn't increase the code complexity significantly.

@sol
Copy link

sol commented Mar 20, 2015

Hspec runs all tests that are not explicitly marked for parallel execution on the main thread, exactly for that reason.

But it's true that this very requirement increases code complexity quite a bit.

Sent from my iPhone

On 20 Mar 2015, at 8:28 am, Roman Cheplyaka notifications@github.com wrote:

I don't know of a way to do this which wouldn't increase the code complexity significantly.


Reply to this email directly or view it on GitHub.

@UnkindPartition
Copy link
Owner

Tasty's architecture makes running independent from reporting — both logically and in terms of threads.

This allows to plug different (and even multiple) reporters easily, but this particular request it makes hard to accomodate.

The situation can be improved somewhat by enabling buffering (#101 (comment)). The output wouldn't be interleaved like it is right now, but it still wouldn't be synchronized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants