nkallen / cache-money

A Write-Through Cacheing Library for ActiveRecord
Apache License 2.0
995 stars 107 forks source link

13 test failures all on mock(Story).get.never... #9

Open wiseleyb opened 15 years ago

wiseleyb commented 15 years ago

All mock(Story).get.never calls are failing with ArgumentError in ... wrong number of arguments (0 for 1)

I'm on Rails 2.3.3, Ruby 1.8.7, Mac OSX, memcached 1.2.5 (on libevent 1.4.12-stable) is running and receiving requests. Using Cache-money 0.2.5. RR is version 0.10.2

Test config memcache config looks like: test: ttl: 604800 namespace: deucescracked sessions: false debug: false servers: localhost:11211

Complete run...

Mac-san:cache_money wiseleyb$ rake (in /Users/wiseleyb/Dev/dc/deucescracked/vendor/plugins/cache_money) /usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
/usr/local/bin/ruby -I"lib:test" "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
-- create_table("stories", {:force=>true}) -> 0.2287s -- create_table("characters", {:force=>true}) -> 0.0022s -- initialize_schema_migrations_table() -> 0.0027s -- assume_migrated_upto_version(2) -> 0.0012s Profiling enabled. ...........................................FF.F......FFFF......F......F..FF...F...................................................................................................................F...**..

Top 10 slowest examples: 0.7442140 Windows#find(...) when the cache is not populated#find(:all, :conditions => ..., :limit => ...) and query limit <= index limit when there are fewer than limit + buffer items populates the cache with all items 0.6272080 Windows#destroy when the cache is populated when the index size is <= limit of items when the count of records in the database is >= limit of items refreshes the list (from the database) 0.6196620 Windows#destroy when the cache is not populated when count of records in the database is <= limit of items when the count of records in the database is between limit and limit + buffer items populates the index 0.6155840 Windows#find(...) when the cache is populated#find(:all, :conditions => ...) uses the database, not the cache 0.6027420 Windows#find(...) when the cache is populated#find(:all, :conditions => ..., :limit => ...) and query limit > index limit uses the database, not the cache 0.5723260 Windows#find(...) when the cache is populated#find(:all, :conditions => ..., :limit => ..., :offset => ...) and query limit + offset > index limit uses the database, not the cache 0.5702350 Windows#find(...) when the cache is not populated#find(:all, :conditions => ..., :limit => ...) and query limit <= index limit when there are more than limit + buffer items populates the cache with limit + buffer items 0.5175020 Windows#find(...) when the cache is populated#find(:all, :conditions => ..., :limit => ...) and query limit <= index limit does not use the database 0.5068240 Cash::Lock#acquire_lock prevents two processes from acquiring the same lock at the same time 0.5023990 Windows#create! when the cache is not populated when the count of records in the database is > limit + buffer items truncates the index

Pending:

Cash::WriteThrough Locking acquires and releases locks, in order, for all indices to be written (TODO) ./spec/cash/write_through_spec.rb:172

Cash::WriteThrough Locking acquires and releases locks on destroy (TODO) ./spec/cash/write_through_spec.rb:183

1) ArgumentError in 'Cash::Finders Calculations when the cache is populated#count(:column, :conditions => ...) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/calculations_spec.rb:19:

2) ArgumentError in 'Cash::Finders Calculations when the cache is populated#count(:all, :distinct => ..., :select => ...) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/calculations_spec.rb:26:

3) ArgumentError in 'Cash::Finders Calculations when the cache is not populated#count(:all, ...)#count(:all) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/calculations_spec.rb:47:

4) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:first, ...)#find(:first, :readonly => true) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:54:

5) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:first, ...)#find(:first, :join => ...) or find(..., :include => ...) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:62:

6) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:first, ...)#find(:first) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:70:

7) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:first, ...)#find(:first, :conditions => "...") on unindexed attributes uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:79:

8) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:first, ...)#find(:first, :conditions => {...}) on unindexed attribtes uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:142:

9) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find(:all) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:217:

10) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find([...])#find([1, 2, ...], :conditions => ...) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:250:

11) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#find#find([...])#find([1], :conditions => ...) uses the database, not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:258:

12) ArgumentError in 'Cash::Finders Cache Usage when the cache is populated#without_cache when finders are called within the provided block uses the database not the cache' wrong number of arguments (0 for 1) ./spec/cash/finders_spec.rb:302:

13) ArgumentError in 'Cash::WriteThrough ClassMethods after destroy when the object is a new record does nothing' wrong number of arguments (0 for 2) ./spec/cash/write_through_spec.rb:134:

Finished in 15.381762 seconds

202 examples, 13 failures, 2 pending rake aborted! Command /usr/local/bin/ruby -I"/Users/wiseleyb/.gem/ruby/1.8/gems/rspec-1.2.8/lib" "/Users/wiseleyb/.gem/ruby/1.8/gems/rspec-1.2.8/bin/spec" "spec/cash/accessor_spec.rb" "spec/cash/active_record_spec.rb" "spec/cash/calculations_spec.rb" "spec/cash/finders_spec.rb" "spec/cash/lock_spec.rb" "spec/cash/order_spec.rb" "spec/cash/transactional_spec.rb" "spec/cash/window_spec.rb" "spec/cash/write_through_spec.rb" --format profile --color failed