Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit dc6c96f

Browse files
committed
Add comments about ignored exceptions
1 parent e7da47c commit dc6c96f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UnitTests/GitHub.App/Services/GitClientTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public async Task WhenToFetch(string baseUrl, string headUrl, string baseSha, st
198198
{
199199
await gitClient.GetPullRequestMergeBase(repo, baseUri, headUri, baseSha, headSha, baseRef, headRef);
200200
}
201-
catch (NotFoundException) { }
201+
catch (NotFoundException) { /* We're interested in calls to Fetch even if it throws */ }
202202

203203
repo.Network.Received(receivedFetch).Fetch(Arg.Any<Remote>(), Arg.Any<string[]>(), Arg.Any<FetchOptions>());
204204
}
@@ -218,7 +218,7 @@ public async Task WhatToFetch(string baseSha, string headSha, string mergeBaseSh
218218
{
219219
await gitClient.GetPullRequestMergeBase(repo, baseUrl, headUrl, baseSha, headSha, baseRef, headRef);
220220
}
221-
catch (NotFoundException) { }
221+
catch (NotFoundException) { /* We're interested in calls to Fetch even if it throws */ }
222222

223223
repo.Network.Received(1).Fetch(Arg.Any<Remote>(), Arg.Is<IEnumerable<string>>(x => x.Contains(expectRefSpec)), Arg.Any<FetchOptions>());
224224
}

0 commit comments

Comments
 (0)