Skip to content

Commit

Permalink
Fix flickering test in MaintenanceTests
Browse files Browse the repository at this point in the history
We want to test that the timestamps don't get copied. We cannot use time
helpers - the timestamps to be checked are created in the backend, so
they are not affected by the Rails time helpers.
  • Loading branch information
eduardoj committed Apr 14, 2023
1 parent 0cb3d5b commit 94697ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/test/functional/maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2410,7 +2410,7 @@ def test_copy_project_with_history_and_binaries
assert_response :success
assert_xml_tag tag: 'status', attributes: { package: 'pack2', code: 'succeeded' }

travel(1.second)
sleep(1) # to ensure that the timestamp becomes newer
post '/source/CopyOfBaseDistro3?cmd=copy&oproject=BaseDistro3&withhistory=1&withbinaries=1&nodelay=1'
assert_response :success
get '/source/CopyOfBaseDistro3/_meta'
Expand Down

0 comments on commit 94697ae

Please sign in to comment.