Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2608: Await the call to FeatureBackgroundAsync #2654

Merged

Conversation

laingsimon
Copy link
Contributor

@laingsimon laingsimon commented Oct 15, 2022

Ensure that calls to FeatureBackgroundAsync are awaited when called, i.e.

Instead of this

// ... snip ...
#line 4
    this.FeatureBackgroundAsync();
#line hidden
// ... snip ...

Generate this

// ... snip ...
#line 4
    await this.FeatureBackgroundAsync();
#line hidden
// ... snip ...

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Performance improvement
  • Refactoring (so no functional change)
  • Other (docs, build config, etc)

Checklist:

  • I've added tests for my code. (most of the time mandatory)
  • I have added an entry to the changelog. (mandatory)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Note: I've not added tests or an entry to the change log for the following reasons:

  • There are no existing tests for the UnitTestMethodGenerator; if you require them then i can have a look to create some
  • I've not added an entry to the changelog as this fixes a change within the 4.0.16-beta version, as such it fixes an issue during the beta. Once again if this is required, please let me know and i'll add something in.

@laingsimon
Copy link
Contributor Author

Manual tests performed:

  1. Build TechTalk.SpecFlow.Generator project
  2. Copy <repo>\TechTalk.SpecFlow.Generator\bin\Debug\netcoreapp3.1\TechTalk.SpecFlow.Generator.dll over %userprofile%\.nuget\packages\specflow.tools.msbuild.generation\4.0.16-beta\tasks\netcoreapp3.1\TechTalk.SpecFlow.Generator.dll
  3. Rebuild client project
  4. Observe a change to the built xxx.feature.cs file in client project

Before

#line 4
    this.FeatureBackgroundAsync();
#line hidden

After

#line 4
    await this.FeatureBackgroundAsync();
#line hidden

Copy link
Contributor

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thx for spotting this out.

@gasparnagy gasparnagy merged commit 631a2d5 into SpecFlowOSS:master Oct 24, 2022
clrudolphi pushed a commit to clrudolphi/SpecFlow that referenced this pull request Oct 24, 2022
Code-Grump pushed a commit to Code-Grump/SpecFlow that referenced this pull request Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants