mirror of https://github.com/lukechilds/node.git
Browse Source
Had to disable Init_tcp because it starts an oi_async thread pool and prevents the node loop from exiting when no watchers remain. Not sure how to deal with this problem in general because eventually we'll need the thread pool.v0.7.4-release
Ryan
16 years ago
3 changed files with 22 additions and 2 deletions
@ -0,0 +1,16 @@ |
|||
#!/usr/bin/env ruby |
|||
require File.dirname(__FILE__) + "/common" |
|||
|
|||
prog = IO.popen("#{$node} #{$tf.path}") |
|||
a = Time.now |
|||
assert_equal("hello\n", prog.readpartial(100)) |
|||
b = Time.now |
|||
assert_equal("world\n", prog.read(100)) |
|||
c = Time.now |
|||
|
|||
assert_less_than(b - a, 0.5) # startup time |
|||
assert_less_than(1.5, c - b) |
|||
|
|||
__END__ |
|||
log("hello"); |
|||
setTimeout(function () { log("world"); }, 1500); |
Loading…
Reference in new issue