Skip to content

Commit

Permalink
Fix another broken test: missed a :consistent_read
Browse files Browse the repository at this point in the history
  • Loading branch information
celeduc committed Jan 17, 2012
1 parent d505ae5 commit 5c088ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions failing_tests.txt
Expand Up @@ -9,36 +9,32 @@ test_single_clob(TestLobs) [/home/ubuntu/src/simple_record/test/test_lobs.rb:87]
puts is 1, should be 0.

3) Failure:
test_big_result(TestResultsArray) [/home/ubuntu/src/simple_record/test/test_results_array.rb:31]:
rs.size should be 110, is 109

4) Failure:
test_count(TestSimpleRecord) [/home/ubuntu/src/simple_record/test/test_simple_record.rb:291]:
<2> expected but was
<3>.

5) Failure:
4) Failure:
test_dirty(TestSimpleRecord) [/home/ubuntu/src/simple_record/test/test_simple_record.rb:205]:
<1> expected but was
<0>.

6) Failure:
5) Failure:
test_nil_attr_deletion(TestSimpleRecord) [/home/ubuntu/src/simple_record/test/test_simple_record.rb:359]:
<0> expected but was
<1>.

7) Failure:
6) Failure:
test_null(TestSimpleRecord) [/home/ubuntu/src/simple_record/test/test_simple_record.rb:384]:
<2> expected but was
<1>.

8) Failure:
7) Failure:
test_save_get(TestSimpleRecord) [/home/ubuntu/src/simple_record/test/test_simple_record.rb:56]:
doh, age should be nil, but it's 32

9) Error:
8) Error:
test_storage_format(TestSimpleRecord):
NoMethodError: undefined method `[]' for nil:NilClass
/home/ubuntu/src/simple_record/test/test_simple_record.rb:543:in `test_storage_format'

68 tests, 2286 assertions, 8 failures, 1 errors, 0 skips
68 tests, 2286 assertions, 7 failures, 1 errors, 0 skips
4 changes: 2 additions & 2 deletions test/test_results_array.rb
Expand Up @@ -27,7 +27,7 @@ def test_big_result
end
assert SimpleRecord.stats.saves == num_made, "SimpleRecord.stats.saves should be #{num_made}, is #{SimpleRecord.stats.saves}"
SimpleRecord.stats.clear # have to clear them again, as each save above created a select (in pre/post actions)
rs = MyModel.find(:all) # should get 100 at a time
rs = MyModel.find(:all,:consistent_read=>true) # should get 100 at a time
assert rs.size == num_made, "rs.size should be #{num_made}, is #{rs.size}"
i = 0
rs.each do |x|
Expand All @@ -48,7 +48,7 @@ def test_big_result

def test_limit
SimpleRecord.stats.clear
rs = MyModel.find(:all, :per_token=>2500)
rs = MyModel.find(:all, :per_token=>2500,:consistent_read=>true)
assert rs.size == 110, "rs.size should be 110, is #{rs.size}"
assert SimpleRecord.stats.selects == 1, "SimpleRecord.stats.selects is #{SimpleRecord.stats.selects}"

Expand Down

0 comments on commit 5c088ce

Please sign in to comment.