mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-04-27 14:57:46 +00:00
test: get to passing on JRuby
- update error message - avoid race condition on cookie expiration
This commit is contained in:
parent
195f5ebb9f
commit
554d38a863
2 changed files with 3 additions and 5 deletions
|
|
@ -50,6 +50,6 @@ end
|
||||||
|
|
||||||
def sleep_until(time)
|
def sleep_until(time)
|
||||||
if (s = time - Time.now) > 0
|
if (s = time - Time.now) > 0
|
||||||
sleep s
|
sleep s + 0.01
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,8 @@ module TestHTTPCookieJar
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_nonexistent_store_in_config
|
def test_nonexistent_store_in_config
|
||||||
assert_raise_with_message(
|
expected = /cookie store unavailable: :nonexistent, error: (cannot load|no such file to load) .*nonexistent_store/
|
||||||
ArgumentError,
|
assert_raise_with_message(ArgumentError, expected) {
|
||||||
/cookie store unavailable: :nonexistent, error: cannot load .*nonexistent_store/
|
|
||||||
) {
|
|
||||||
HTTP::CookieJar.new(store: :nonexistent)
|
HTTP::CookieJar.new(store: :nonexistent)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue