Skip to content

Commit

Permalink
Updated existing test that fails with this fix (8d63678). Before the …
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
phuibonhoa committed Sep 22, 2011
1 parent 8d63678 commit a0352a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/test/caching_test.rb
Expand Up @@ -357,7 +357,7 @@ def test_crazy_key_characters

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)
Expand Down

0 comments on commit a0352a4

Please sign in to comment.