Skip to content

Commit

Permalink
[ci] avoid random ordering due to identical timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Dec 1, 2014
1 parent e858207 commit 318f90d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/api/test/functional/request_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2946,6 +2946,7 @@ def test_repository_delete_request
assert_response :success
id = Xmlhash.parse(@response.body)['id']

Timecop.freeze(1)
delete '/source/home:Iggy:fordecline'
assert_response :success

Expand All @@ -2959,15 +2960,16 @@ def test_repository_delete_request
'state' =>
{ 'name' => 'declined',
'who' => 'Iggy',
'when' => '2010-07-12T00:00:00',
'when' => '2010-07-12T00:00:01',
'comment' => "The target project 'home:Iggy:fordecline' was removed" },
'history' => [{"who"=>"Iggy",
"when"=>"2010-07-12T00:00:00",
"description"=>"Request created"},
{ 'who' => 'Iggy', 'when' => '2010-07-12T00:00:00',
{ 'who' => 'Iggy', 'when' => '2010-07-12T00:00:01',
"description" => "Request got declined",
'comment' => "The target project 'home:Iggy:fordecline' was removed"}] }, node)

Timecop.freeze(1)
post "/request/#{id}?cmd=changestate&newstate=revoked"
assert_response :success

Expand All @@ -2980,15 +2982,15 @@ def test_repository_delete_request
'person' => { 'name' => 'Iggy', 'role' => 'reviewer' } },
'state' => { 'name' => 'revoked',
'who' => 'Iggy',
'when' => '2010-07-12T00:00:00',
'when' => '2010-07-12T00:00:02',
'comment' => {} },
'history' =>
[{"who"=>"Iggy", "when"=>"2010-07-12T00:00:00",
"description"=>"Request created"},
{"who"=>"Iggy", "when"=>"2010-07-12T00:00:00",
{"who"=>"Iggy", "when"=>"2010-07-12T00:00:01",
"description"=>"Request got declined",
"comment"=>"The target project 'home:Iggy:fordecline' was removed"},
{"who"=>"Iggy", "when"=>"2010-07-12T00:00:00",
{"who"=>"Iggy", "when"=>"2010-07-12T00:00:02",
"description"=>"Request got revoked"}] }, node)

end
Expand Down

0 comments on commit 318f90d

Please sign in to comment.