ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

CP code or test assumes ordering where none is guaranteed (Bug #892)


Added by Dies Koper at 2012-02-15 01:40 pm. Updated at 2012-02-29 09:29 pm.


Status:Closed Start date:2012-02-15
Priority:Normal Due date:
Assignee:Felix Schäfer % Done:

0%

Category:Issue tracking
Target version:3.1.0
Remote issue URL: Affected version:3.0.0

Description

The following functional test failed on CentOS 5 with pg 0.13.1. It passed with pg 0.9.0, 0.10.0 and 0.11.0 when I tried.

  1) Failure:
test_post_new(TrackersControllerTest) [test/functional/trackers_controller_test.rb:48]:
<[1, 6]> expected but was
<[6, 1]>.

I'm not sure what the Category is. Hopefully testing, but until it's confirmed it's not a bug in CP code I'll make a guess and pick one that sounds like where it could belong.


Associated revisions

Revision b9e380c9
Added by Jean-Philippe Lang at 2008-03-27 07:41 pm

Add breadcrumb nav for the forums (#892).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1299 e93f8b46-1217-0410-a6f0-8f06a7374b81

Revision 4a3f1031
Added by Felix Schäfer at 2012-02-29 10:28 pm

Correct (wrongly) assumed ordering in test #892

Contributed by Luke Carrier.

History

Updated by Dies Koper at 2012-02-17 01:49 am

FYI, after fixing bug #891 locally, all tests passed on Windows Server 2003 SE SP2 with pg 0.9.0 and 0.13.1, confirming your hunch that there is an ordering assumption in play that can cause intermittent failures.

Updated by Felix Schäfer at 2012-02-17 12:49 pm

Thanks for the feedback, I'll try to look into it this WE.

Updated by Luke Carrier at 2012-02-29 01:52 pm

A quick fix, but I can't attach it:


diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb
index 0dfb3dd..a03a02c 100644
--- a/test/functional/trackers_controller_test.rb
+++ b/test/functional/trackers_controller_test.rb
@@ -45,7 +45,7 @@ class TrackersControllerTest < ActionController::TestCase
     assert_redirected_to :action => 'index'
     tracker = Tracker.find_by_name('New tracker')
     assert_equal [1], tracker.project_ids.sort
-    assert_equal [1, 6], tracker.custom_field_ids
+    assert_equal [1, 6], tracker.custom_field_ids.sort
     assert_equal 0, tracker.workflows.count
   end

Updated by Felix Schäfer at 2012-02-29 09:29 pm

Committed in 4a3f103, thanks!

  • Status changed from Open to Closed

Also available in: Atom PDF