diff options
author | Toon Claes <toon@gitlab.com> | 2018-11-20 17:46:22 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2018-11-28 00:48:55 +0300 |
commit | 220208c051ef8a23c801662beeee6b60d00b4b18 (patch) | |
tree | aca6765b47ac969f3f78c4fffa47393a724d7182 /spec/migrations | |
parent | cc70bd8440d5de0c3e25dfa6e94337d4fbd245d3 (diff) |
Retry the failing projects
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/backfill_store_project_full_path_in_repo_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb b/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb index b5e770e6b01..ced6b09dfc0 100644 --- a/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb +++ b/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb @@ -27,6 +27,16 @@ describe BackfillStoreProjectFullPathInRepo, :migration do migration.up end + it 'retries in case of failure' do + repository_service = spy(:repository_service) + + allow(Gitlab::GitalyClient::RepositoryService).to receive(:new).and_return(repository_service) + allow(repository_service).to receive(:set_config).and_raise(GRPC::BadStatus, 'Retry me') + expect(repository_service).to receive(:set_config).exactly(3).times + + migration.up + end + context 'legacy storage' do it 'finds the repository at the correct location' do Project.find(project.id).create_repository |