Updated existing test that fails with this fix (8d63678d14). Before the fix the test was giving a false positive, because file_store.key_file_path would return an empty filename (i.e. test/tmp_cache/4D0/F4D rather than test/tmp_cache/4D0/F4D/xxxx…).

Even though the fix referenced above divides the filename into directories to prevent it from being too long, it seems that 1000 characters will always raise an error, so reducing the key size to 900).
This commit is contained in:
Philippe Huibonhoa 2011-09-21 21:03:59 -07:00
parent 8d63678d14
commit a0352a425f
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ module CacheStoreBehavior
def test_really_long_keys
key = ""
1000.times{key << "x"}
900.times{key << "x"}
assert_equal true, @cache.write(key, "bar")
assert_equal "bar", @cache.read(key)
assert_equal "bar", @cache.fetch(key)