Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

fix web-runner #3

Open
wants to merge 24 commits into from

4 participants

@dominictarr
Collaborator

found missing } which was preventing web-runner from compiling.

dominictarr added some commits
@dominictarr dominictarr commiting to merge eb38724
@dominictarr dominictarr fix conflicts 1f1c435
@dominictarr dominictarr my local changes 7a76a78
@dominictarr dominictarr updated to most recent e449487
@dominictarr dominictarr up to date 5691284
@dominictarr dominictarr uptoday 2a59da3
@dominictarr dominictarr merging 91cf0f2
@dominictarr dominictarr located missing } in web-runner.js 26b3a45
@dominictarr dominictarr striping back to essential changes 29a66da
@dominictarr dominictarr cleaning for pull request 1a6bcd2
@dominictarr dominictarr cleaning for pull request ac1062e
@dominictarr dominictarr cleaning for pull request d43868f
@dominictarr dominictarr started api docs 44b3d02
@dominictarr dominictarr updated testing a621b48
@dominictarr dominictarr asynct command 6dc0271
@dominictarr dominictarr asynct command fixed c46bf00
@dominictarr dominictarr fixing messages 8d7f2f8
@dominictarr dominictarr refactored async report tests 7d163a1
@dominictarr dominictarr writing tests, discovered that since runFile communicates over stdio,
logging in stdio breaks it...

beginning to rewrite runFile to use some other means of communication.

moved message functions into async_testing/lib/messages.js
0ea0513
@dominictarr dominictarr lots of work on tests,
found a couple of problems with child,

tests that logged stuff was breaking reporting,
and you could make false positives by outputting a finish message (indicating 0 tests, which is success(!))

started working on another child process implementation, using http.

but realised that the messages must be queued, so that they arrive in order.
3bbca56
@bentomas
Owner

Can you post a gist of a file that logs to stdout and breaks runFile? I can't reproduce that. At this point runFile's implementation is very simple and straight-forward and I'm reluctant to make it do more unless it is absolutely necessary. I actually have a patch in the works that allows people running runFile to catch the stdout of a suite (looks like this https://gist.github.com/704636) to give suite runners full control over how a suite is being outputted. I think this is great, and don't want to have stdout automatically get printed if we can avoid it.

If stdout messages are getting confused as encoded messages then we should probably just make coded messages more unique.

Collaborator

hi, i was getting a bunch of weird output occasionally

things like all the tests reporting "OK", but the end report saying there was problems.

here is a simple one,

https://gist.github.com/704800

Collaborator

also, since it depends on new lines,
if you use require('util').print("xxxxxx")

it will prevent the next message from getting through... which is surely onTestDone

... i have a test which checks that onTestStart, onTestDone, and onSuiteDone are all called correctly.
https://github.com/dominictarr/node-async-testing/blob/master/test/async_testing.options.async.js

you can break it by adding require('util').print("xxxxxx") into a test in the test/examples directory.

runFile IS simple, i got a bit carried away yesterday, trying to rewrite it with http.
at 3am i realized that i needed some way to queue the messages so that they arrive in the correct order.

I learnt much more about http than i knew before,
but I've also thought of a way to make messaging across stdout more secure.
first grab them with regex, so that they don't have to have their own line, and second,
wrap them in 'magic numbers' (a highly unlikely random string of digits, which will be passed to child,
so that messages can be distinguished from each other with astronomically low chances of collision.

Collaborator

wow, another confusing thing is that
require('async_testing/lib/testing').runSuite(filename)
makes a stack overflow.

now that i have realised that it's meant be runSuite(require(filename)), I will be able to get a good night's sleep...

@deepthawtz

/usr/local/lib/node/.npm/async_testing/9999.0.0-LINK-25de0aad/package/lib/web-runner.js:343
});

@dbrock

You should really fix this immediately. It prevents the whole package from even loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 16, 2010
  1. @dominictarr

    commiting to merge

    dominictarr authored
  2. @dominictarr

    fix conflicts

    dominictarr authored
Commits on Oct 27, 2010
  1. @dominictarr

    my local changes

    dominictarr authored
  2. @dominictarr

    updated to most recent

    dominictarr authored
  3. @dominictarr

    up to date

    dominictarr authored
Commits on Oct 29, 2010
  1. @dominictarr

    uptoday

    dominictarr authored
Commits on Nov 7, 2010
  1. @dominictarr

    merging

    dominictarr authored
  2. @dominictarr
  3. @dominictarr
  4. @dominictarr

    cleaning for pull request

    dominictarr authored
  5. @dominictarr

    cleaning for pull request

    dominictarr authored
  6. @dominictarr

    cleaning for pull request

    dominictarr authored
  7. @dominictarr

    started api docs

    dominictarr authored
Commits on Nov 8, 2010
  1. @dominictarr

    updated testing

    dominictarr authored
  2. @dominictarr

    asynct command

    dominictarr authored
  3. @dominictarr

    asynct command fixed

    dominictarr authored
Commits on Nov 17, 2010
  1. @dominictarr

    fixing messages

    dominictarr authored
  2. @dominictarr
  3. @dominictarr

    writing tests, discovered that since runFile communicates over stdio,

    dominictarr authored
    logging in stdio breaks it...
    
    beginning to rewrite runFile to use some other means of communication.
    
    moved message functions into async_testing/lib/messages.js
  4. @dominictarr

    lots of work on tests,

    dominictarr authored
    found a couple of problems with child,
    
    tests that logged stuff was breaking reporting,
    and you could make false positives by outputting a finish message (indicating 0 tests, which is success(!))
    
    started working on another child process implementation, using http.
    
    but realised that the messages must be queued, so that they arrive in order.
Commits on Nov 21, 2010
  1. @dominictarr
  2. @dominictarr
Commits on Dec 16, 2010
  1. @dominictarr

    update

    dominictarr authored
Commits on Dec 22, 2010
  1. @dominictarr

    remove crud

    dominictarr authored
Something went wrong with that request. Please try again.