question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to rollback mutation

See original GitHub issue

Stryker fails to rollback mutations for several nodes.

Version 0.7.0 (beta)

[10:48:59 INF] Using C:\foo\bar.csproj as project file
[10:48:59 INF] Starting initial build
[10:49:04 INF] Initial build successful
[10:49:05 INF] Using testrunner DotnetTestRunner
[10:49:05 INF] Initial testrun started
[10:49:40 INF] Total number of tests found in initial test run: 0
[10:49:40 INF] Initial testrun successful in 34437 ms
[10:49:40 INF] Using 81655 ms as testrun timeout
[10:49:41 INF] 949 mutants created
[10:49:43 ERR] Unable to rollback mutation for node reader with diagnostic message Der Name "reader" ist im aktuellen Kontext nicht vorhanden.
[10:49:43 ERR] Unable to rollback mutation for node command with diagnostic message Der Name "command" ist im aktuellen Kontext nicht vorhanden.
[10:49:43 ERR] Unable to rollback mutation for node mySqlConnection with diagnostic message Der Name "mySqlConnection" ist im aktuellen Kontext nicht vorhanden.
[10:49:43 ERR] Unable to rollback mutation for node mySqlConnection with diagnostic message Der Name "mySqlConnection" ist im aktuellen Kontext nicht vorhanden.
[10:49:43 ERR] An error occurred during the mutation test run
System.ArgumentException: Der aufzuzeichnende Knoten ist kein untergeordnetes Element des Stamms.
   at Microsoft.CodeAnalysis.SyntaxNodeExtensions.TrackNodes[TRoot](TRoot root, IEnumerable`1 nodes) in /_/src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions_Tracking.cs:line 43
   at Stryker.Core.Compiling.RollbackProcess.RemoveMutantIfStatements(SyntaxTree originalTree, ICollection`1 diagnosticInfo)
   at Stryker.Core.Compiling.RollbackProcess.Start(CSharpCompilation compiler, ImmutableArray`1 diagnostics)
   at Stryker.Core.Compiling.CompilingProcess.Compile(IEnumerable`1 syntaxTrees, MemoryStream ms)
   at Stryker.Core.MutationTest.MutationTestProcess.Mutate()
   at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options)
[10:49:43 INF] Time Elapsed 00:00:43.7736487

We have some database integration tests in our unit tests. Maybe this is related to the error. The unit tests arre running fine when using dotnet test

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
richardwerkmancommented, Dec 7, 2018

Thank you, using your output I’ve been able to reproduce the issue locally.

using System.Threading.Tasks;

namespace Test
{
    public class ExampleBug
    {
        public async Task<(string, string)> ExampleBugMethod()
        {
            var (one, two) = await ExampleTupleMethod().ConfigureAwait(true);

            return (one, two);
        }

        private async Task<(string one, string two)> ExampleTupleMethod()
        {
            return ("test1", "test2");
        }
    }
}

Using var (tuple) seems to cause the issue. This was already known as seen in #125 but was closed without verifiying if the issue was actually fixed.

I’ll try to create a PR for this today 👍

0reactions
klemmchrcommented, Dec 6, 2018

I’ve send you a mail.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bundle mutations and rollback in case of error - GraphQL
It would be great if mutations could be bundled instead and rolled back automatically if an error occurs on one of them. What...
Read more >
"Original project under test cannot be loaded" ...
"Original project under test cannot be loaded" and "Unable to rollback mutation" when BuildOutputDir is changed relative to project dir #462.
Read more >
Is there a rollback on mutation errors?
Solved: Hi, I am using the Urban API to create parcels in batch, but sometimes I am facing the 504 timeout error even...
Read more >
Multiple Mutations in a Request | Hasura GraphQL Docs
In requests where a Remote Schema or Action is present, and a mutation fails, rollback is not possible. Any mutations executed before the...
Read more >
Redux Query Dependent Mutations With Rollback Using ...
I have two mutations that need to happen one after another if the first one succeeds. As bonus I would like to undo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found