Skip to content

Commit

Permalink
fix idle test with epoll (cc #427)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Apr 2, 2013
1 parent 7f5e231 commit 61095b4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/test_idle_connection.rb
Expand Up @@ -9,15 +9,17 @@ def test_idle_time
$idle_time = conn.get_idle_time
conn.send_data "GET / HTTP/1.0\r\n\r\n"
EM.next_tick{
$idle_time_after_send = conn.get_idle_time
conn.close_connection
EM.stop
EM.next_tick{
$idle_time_after_send = conn.get_idle_time
conn.close_connection
EM.stop
}
}
}
}

assert_in_delta 3, $idle_time, 0.2
assert_equal 0, $idle_time_after_send
assert_in_delta 0, $idle_time_after_send, 0.1
end
end
end

0 comments on commit 61095b4

Please sign in to comment.