Skip to content

Flaky test: ImageCollection_Item_Get32bppColorDepth_Success #3898

@JeremyKuhne

Description

@JeremyKuhne

System.Windows.Forms.Tests.ImageCollectionTests.ImageCollection_Item_Get32bppColorDepth_Success is failing intermittently in the CI. It has failed several times over the last month with the exact same error:

Error message
Assert.Equal() Failure\r\nExpected: Color [A=255, R=255, G=0, B=0]\r\nActual:   Color [A=255, R=0, G=0, B=0]

Stack trace
   at System.Windows.Forms.Tests.ImageCollectionTests.ImageCollection_Item_Get32bppColorDepth_Success() in F:\workspace\_work\1\s\src\System.Windows.Forms\tests\UnitTests\System\Windows\Forms\ImageList.ImageCollectionTests.cs:line 215
            using Bitmap resultImage24bppRgbCustom = Assert.IsType<Bitmap>(collection[5]);
            Assert.NotSame(image24bppRgbCustom, resultImage24bppRgbCustom);
            Assert.Equal(new Size(16, 16), resultImage24bppRgbCustom.Size);
            Assert.Equal(PixelFormat.Format32bppArgb, resultImage24bppRgbCustom.PixelFormat);
            Assert.Equal(Color.FromArgb(0xFF, 0xFF, 0x00, 0x00), resultImage24bppRgbCustom.GetPixel(0, 0));   // <-- Failing line
            Assert.Equal(Color.FromArgb(0xFF, 50, 75, 100), resultImage24bppRgbCustom.GetPixel(1, 0));

Metadata

Metadata

Assignees

No one assigned

    Labels

    test-bugProblem in test source code (most likely)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions