Skip to content

Commit d75c4c7

Browse files
committed
fix configure await
1 parent 9142227 commit d75c4c7

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,6 @@ dotnet_diagnostic.CA1309.severity = error
134134

135135
# Banned API Analyzers
136136
dotnet_diagnostic.RS0030.severity = error
137+
138+
# Configure await
139+
configure_await_analysis_mode = library

.github/workflows/master.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,16 @@ jobs:
2020
uses: actions/checkout@v2
2121
with:
2222
fetch-depth: 0
23+
- name: Install dependencies
24+
run: dotnet restore
2325
- name: Build solution
24-
run: dotnet build -c Release
26+
run: dotnet build -c Release --no-restore
27+
- name: Run tests
28+
run: dotnet test -c Release --no-build --verbosity normal
2529
- name: Create NuGet packages
2630
run: dotnet pack -c Release --no-build -o nupkg
2731
- name: Upload nuget packages
2832
uses: actions/upload-artifact@v1
2933
with:
3034
name: nupkg
3135
path: nupkg
32-
33-
test:
34-
name: Test
35-
needs: [build]
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v2
40-
- name: Download version info file
41-
uses: actions/download-artifact@v1
42-
with:
43-
name: gitversion
44-
path: ./
45-
- name: Inject version info into environment
46-
run: cat ./gitversion.env >> $GITHUB_ENV
47-
- name: Run tests
48-
run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet test -c Release

Src/FluentAssertions.Reactive/ReactiveAssertions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public async Task<AndWhichConstraint<ReactiveAssertions<TPayload>, IEnumerable<T
8989
.Timeout(timeout)
9090
.Catch<TPayload, TimeoutException>(exception => Observable.Empty<TPayload>())
9191
.ToList()
92-
.ToTask();
92+
.ToTask().ConfigureAwait(false);
9393
}
9494
catch (Exception e)
9595
{
@@ -174,7 +174,7 @@ public async Task<ExceptionAssertions<TException>> ThrowAsync<TException>(TimeSp
174174
string because = "", params object[] becauseArgs)
175175
where TException : Exception
176176
{
177-
var notifications = await GetRecordedNotifications(timeout);
177+
var notifications = await GetRecordedNotifications(timeout).ConfigureAwait(false);
178178
return Throw<TException>(notifications, because, becauseArgs);
179179
}
180180

@@ -206,7 +206,7 @@ public AndConstraint<ReactiveAssertions<TPayload>> Complete(TimeSpan timeout,
206206
public async Task<AndConstraint<ReactiveAssertions<TPayload>>> CompleteAsync(TimeSpan timeout,
207207
string because = "", params object[] becauseArgs)
208208
{
209-
var notifications = await GetRecordedNotifications(timeout);
209+
var notifications = await GetRecordedNotifications(timeout).ConfigureAwait(false);
210210

211211
return Complete(timeout, because, becauseArgs, notifications);
212212
}

Src/FluentAssertions.Reactive/ReactiveExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static async Task<TPayload> GetLastMessageAsync<TPayload>(
7878
this Task<AndWhichConstraint<ReactiveAssertions<TPayload>, IEnumerable<TPayload>>>
7979
assertionTask)
8080
{
81-
var constraint = await assertionTask;
81+
var constraint = await assertionTask.ConfigureAwait(false);
8282
return constraint.Subject.LastOrDefault();
8383
}
8484

0 commit comments

Comments
 (0)