• Stan Hu's avatar
    Fix failing test in spec/workers/post_receive_spec.rb · 28c48804
    Stan Hu authored
    This is what was happening before:
    
    1. `Project#set_timestamps_for_create` was called at creation time
    and set the `last_activity_at` and `last_repository_updated_at`
    to the current timestamp T.
    
    2. The test ran `PostReceive#perform`, which then called
    `PostReceive#process_wiki_changes`. If less than 500 milliseconds
    elapsed since T, then the update would just set the timestamp to T.
    
    To fix this problem, we can just use Timecop to ensure at least
    one second has elapsed after attempting to process changes.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/8871
    28c48804
Name
Last commit
Last update
..
auto_devops Loading commit data...
ci Loading commit data...
concerns Loading commit data...
deployments Loading commit data...
gitlab/github_import Loading commit data...
hashed_storage Loading commit data...
mail_scheduler Loading commit data...
object_pool Loading commit data...
repository_check Loading commit data...
todos_destroyer Loading commit data...
admin_email_worker_spec.rb Loading commit data...
archive_trace_worker_spec.rb Loading commit data...
authorized_projects_worker_spec.rb Loading commit data...
background_migration_worker_spec.rb Loading commit data...
build_coverage_worker_spec.rb Loading commit data...
build_finished_worker_spec.rb Loading commit data...
build_hooks_worker_spec.rb Loading commit data...
build_success_worker_spec.rb Loading commit data...
build_trace_sections_worker_spec.rb Loading commit data...
cleanup_container_repository_worker_spec.rb Loading commit data...
cluster_configure_worker_spec.rb Loading commit data...
cluster_provision_worker_spec.rb Loading commit data...
cluster_wait_for_ingress_ip_address_worker_spec.rb Loading commit data...
create_gpg_signature_worker_spec.rb Loading commit data...
create_note_diff_file_worker_spec.rb Loading commit data...
create_pipeline_worker_spec.rb Loading commit data...
delete_container_repository_worker_spec.rb Loading commit data...
delete_diff_files_worker_spec.rb Loading commit data...
delete_merged_branches_worker_spec.rb Loading commit data...
delete_user_worker_spec.rb Loading commit data...
detect_repository_languages_worker_spec.rb Loading commit data...
email_receiver_worker_spec.rb Loading commit data...
emails_on_push_worker_spec.rb Loading commit data...
every_sidekiq_worker_spec.rb Loading commit data...
expire_build_artifacts_worker_spec.rb Loading commit data...
expire_build_instance_artifacts_worker_spec.rb Loading commit data...
expire_job_cache_worker_spec.rb Loading commit data...
expire_pipeline_cache_worker_spec.rb Loading commit data...
git_garbage_collect_worker_spec.rb Loading commit data...
gitlab_shell_worker_spec.rb Loading commit data...
gitlab_usage_ping_worker_spec.rb Loading commit data...
group_destroy_worker_spec.rb Loading commit data...
import_issues_csv_worker_spec.rb Loading commit data...
invalid_gpg_signature_update_worker_spec.rb Loading commit data...
issue_due_scheduler_worker_spec.rb Loading commit data...
merge_worker_spec.rb Loading commit data...
namespaceless_project_destroy_worker_spec.rb Loading commit data...
new_issue_worker_spec.rb Loading commit data...
new_merge_request_worker_spec.rb Loading commit data...
new_note_worker_spec.rb Loading commit data...
pages_domain_verification_cron_worker_spec.rb Loading commit data...
pages_domain_verification_worker_spec.rb Loading commit data...
pipeline_hooks_worker_spec.rb Loading commit data...
pipeline_metrics_worker_spec.rb Loading commit data...
pipeline_notification_worker_spec.rb Loading commit data...
pipeline_process_worker_spec.rb Loading commit data...
pipeline_schedule_worker_spec.rb Loading commit data...
pipeline_success_worker_spec.rb Loading commit data...
pipeline_update_worker_spec.rb Loading commit data...
plugin_worker_spec.rb Loading commit data...
post_receive_spec.rb Loading commit data...
process_commit_worker_spec.rb Loading commit data...
project_cache_worker_spec.rb Loading commit data...
project_destroy_worker_spec.rb Loading commit data...
project_export_worker_spec.rb Loading commit data...
project_migrate_hashed_storage_worker_spec.rb Loading commit data...
project_service_worker_spec.rb Loading commit data...
propagate_service_template_worker_spec.rb Loading commit data...
prune_old_events_worker_spec.rb Loading commit data...
prune_web_hook_logs_worker_spec.rb Loading commit data...
reactive_caching_worker_spec.rb Loading commit data...
rebase_worker_spec.rb Loading commit data...
remote_mirror_notification_worker_spec.rb Loading commit data...
remove_expired_group_links_worker_spec.rb Loading commit data...
remove_expired_members_worker_spec.rb Loading commit data...
remove_unreferenced_lfs_objects_worker_spec.rb Loading commit data...
repository_cleanup_worker_spec.rb Loading commit data...
repository_fork_worker_spec.rb Loading commit data...
repository_import_worker_spec.rb Loading commit data...
repository_remove_remote_worker_spec.rb Loading commit data...
repository_update_remote_mirror_worker_spec.rb Loading commit data...
run_pipeline_schedule_worker_spec.rb Loading commit data...
stage_update_worker_spec.rb Loading commit data...
stuck_ci_jobs_worker_spec.rb Loading commit data...
stuck_import_jobs_worker_spec.rb Loading commit data...
stuck_merge_jobs_worker_spec.rb Loading commit data...
system_hook_push_worker_spec.rb Loading commit data...
trending_projects_worker_spec.rb Loading commit data...
update_head_pipeline_for_merge_request_worker_spec.rb Loading commit data...
update_merge_requests_worker_spec.rb Loading commit data...
upload_checksum_worker_spec.rb Loading commit data...
wait_for_cluster_creation_worker_spec.rb Loading commit data...