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

Unit test fails after arcade update #1030

Open
Tracked by #8607
AdamYoblick opened this issue May 23, 2019 · 3 comments
Open
Tracked by #8607

Unit test fails after arcade update #1030

AdamYoblick opened this issue May 23, 2019 · 3 comments
Labels
test-bug Problem in test source code (most likely)
Milestone

Comments

@AdamYoblick
Copy link
Member

https://dev.azure.com/dnceng/public/_build/results?buildId=198756&view=ms.vss-test-web.build-test-results-tab&runId=4820080&resultId=101525&paneView=debug

This is passing in master.

No idea why an arcade update would cause this to fail, but I'm disabling this test for now to allow code to flow.

@merriemcgaw merriemcgaw added the test-bug Problem in test source code (most likely) label May 24, 2019
@merriemcgaw merriemcgaw added this to the Future milestone May 24, 2019
@AdamYoblick AdamYoblick removed their assignment Aug 20, 2019
@hughbe
Copy link
Contributor

hughbe commented May 5, 2020

The build is not found. I suggest closing this :))

Found the failing test:

[WinFormsTheory(Skip = "Flaky test, see: https://github.com/dotnet/winforms/issues/1030")]
[InlineData(true, 0)]
[InlineData(false, 1)]
public void PropertyManager_EndCurrentEdit_IEditableObjectCurrentNotSuccess_DoesNotCallEndEdit(bool cancel, int expectedCallCount)
{
    int callCount = 0;
    var dataSource = new EditableDataSource
    {
        EndEditHandler = () =>
        {
            callCount++;
        }
    };

    var manager = new PropertyManager(dataSource);
    using var control = new SubControl { Visible = true };
    control.CreateControl();
    var controlBindings = new ControlBindingsCollection(control);
    var cancelBinding = new Binding("Value", dataSource, "Property", true);
    BindingCompleteEventHandler bindingCompleteHandler = (sender, e) =>
    {
        e.Cancel = cancel;
    };

    cancelBinding.BindingComplete += bindingCompleteHandler;
    controlBindings.Add(cancelBinding);
    manager.Bindings.Add(cancelBinding);
    manager.EndCurrentEdit();
    Assert.Equal(expectedCallCount, callCount);

    manager.EndCurrentEdit();
    Assert.Equal(expectedCallCount * 2, callCount);
}

@weltkante
Copy link
Contributor

but I'm disabling this test for now to allow code to flow.

Does it require to reenable a test for closing this issue? Probably should document which test needs to be reenabled?

@RussKie
Copy link
Member

RussKie commented May 6, 2020

but I'm disabling this test for now to allow code to flow.

Does it require to reenable a test for closing this issue? Probably should document which test needs to be reenabled?

Yes, once disabled test(s) is re-enabled an associated issue(s) get closed.
I think when we started, flaky tests would get commented out. Later we started using "Skip(reason, link)" notation.

Looks like @hughbe has found the offending test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-bug Problem in test source code (most likely)
Projects
None yet
Development

No branches or pull requests

5 participants