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

v2.6.1 breaks existing test - Assert.Equal() Failure: Collections differ #2821

Closed
tig opened this issue Nov 16, 2023 · 10 comments
Closed

v2.6.1 breaks existing test - Assert.Equal() Failure: Collections differ #2821

tig opened this issue Nov 16, 2023 · 10 comments

Comments

@tig
Copy link

tig commented Nov 16, 2023

I have not been able to create a simpler repro yet but will if it's needed.

We have the following test:

Assert.Equal (TextModel.StringToRuneCells ("Threally really first line."), tm.GetLine (0));

With v2.5.3 this test passed.

With xUnit v2.6.1 we get:

Xunit.Sdk.EqualException: 'Assert.Equal() Failure: Collections differ
           ↓ (pos 0)
Expected: [U+0054 'T'; null, U+0068 'h'; null, U+0072 'r'; null, U+0065 'e'; null, U+0061 'a'; null, ···]
Actual:   [U+0054 'T'; null, U+0068 'h'; null, U+0072 'r'; null, U+0065 'e'; null, U+0061 'a'; null, ···]
           ↑ (pos 0)'

Breaking on this Assert and viewing the two objects in Immediate Window, they are the same:

tm.GetLine(0)
Count = 27
    [0]: "U+0054 'T'; null"
    [1]: "U+0068 'h'; null"
    [2]: "U+0072 'r'; null"
    [3]: "U+0065 'e'; null"
    [4]: "U+0061 'a'; null"
    [5]: "U+006C 'l'; null"
    [6]: "U+006C 'l'; null"
    [7]: "U+0079 'y'; null"
    [8]: "U+0020 ' '; null"
    [9]: "U+0072 'r'; null"
    [10]: "U+0065 'e'; null"
    [11]: "U+0061 'a'; null"
    [12]: "U+006C 'l'; null"
    [13]: "U+006C 'l'; null"
    [14]: "U+0079 'y'; null"
    [15]: "U+0020 ' '; null"
    [16]: "U+0066 'f'; null"
    [17]: "U+0069 'i'; null"
    [18]: "U+0072 'r'; null"
    [19]: "U+0073 's'; null"
    [20]: "U+0074 't'; null"
    [21]: "U+0020 ' '; null"
    [22]: "U+006C 'l'; null"
    [23]: "U+0069 'i'; null"
    [24]: "U+006E 'n'; null"
    [25]: "U+0065 'e'; null"
    [26]: "U+002E '.'; null"
TextModel.StringToRuneCells ("Threally really first line.")
Count = 27
    [0]: "U+0054 'T'; null"
    [1]: "U+0068 'h'; null"
    [2]: "U+0072 'r'; null"
    [3]: "U+0065 'e'; null"
    [4]: "U+0061 'a'; null"
    [5]: "U+006C 'l'; null"
    [6]: "U+006C 'l'; null"
    [7]: "U+0079 'y'; null"
    [8]: "U+0020 ' '; null"
    [9]: "U+0072 'r'; null"
    [10]: "U+0065 'e'; null"
    [11]: "U+0061 'a'; null"
    [12]: "U+006C 'l'; null"
    [13]: "U+006C 'l'; null"
    [14]: "U+0079 'y'; null"
    [15]: "U+0020 ' '; null"
    [16]: "U+0066 'f'; null"
    [17]: "U+0069 'i'; null"
    [18]: "U+0072 'r'; null"
    [19]: "U+0073 's'; null"
    [20]: "U+0074 't'; null"
    [21]: "U+0020 ' '; null"
    [22]: "U+006C 'l'; null"
    [23]: "U+0069 'i'; null"
    [24]: "U+006E 'n'; null"
    [25]: "U+0065 'e'; null"
    [26]: "U+002E '.'; null"

Are there any known issues in xUnit > v2.5.3 that might be causing this?

@tig
Copy link
Author

tig commented Nov 16, 2023

Relevant code:

	/// <summary>
	/// Represents a single row/column within the <see cref="TextView"/>. Includes the glyph and the foreground/background colors.
	/// </summary>
	[DebuggerDisplay ("{DebuggerDisplay}")]
	public class RuneCell : IEquatable<RuneCell> {
		/// <summary>
		/// The glyph to draw.
		/// </summary>
		[JsonConverter (typeof (RuneJsonConverter))]
		public Rune Rune { get; set; }

		/// <summary>
		/// The <see cref="Terminal.Gui.ColorScheme"/> color sets to draw the glyph with.
		/// </summary>
		[JsonConverter (typeof (ColorSchemeJsonConverter))]
		public ColorScheme? ColorScheme { get; set; }

		/// <summary>Indicates whether the current object is equal to another object of the same type.</summary>
		/// <param name="other">An object to compare with this object.</param>
		/// <returns>
		///   <see langword="true" /> if the current object is equal to the <paramref name="other" /> parameter; 
		///   otherwise, <see langword="false" />.</returns>
		public bool Equals (RuneCell? other)
		{
			return other != null &&
			    Rune.Equals (other.Rune) &&
			    ColorScheme == other.ColorScheme;
		}

		/// <summary>Returns a string that represents the current object.</summary>
		/// <returns>A string that represents the current object.</returns>
		public override string ToString ()
		{
			string colorSchemeStr = ColorSchemeDebuggerDisplay ();
			return DebuggerDisplay;
		}

		private string ColorSchemeDebuggerDisplay ()
		{
			var colorSchemeStr = "null";
			if (ColorScheme != null) {
				colorSchemeStr = $"Normal: {ColorScheme.Normal.Foreground},{ColorScheme.Normal.Background}; " +
				    $"Focus: {ColorScheme.Focus.Foreground},{ColorScheme.Focus.Background}; " +
				    $"HotNormal: {ColorScheme.HotNormal.Foreground},{ColorScheme.HotNormal.Background}; " +
				    $"HotFocus: {ColorScheme.HotFocus.Foreground},{ColorScheme.HotFocus.Background}; " +
				    $"Disabled: {ColorScheme.Disabled.Foreground},{ColorScheme.Disabled.Background}";
			}

			return colorSchemeStr;
		}

		private string DebuggerDisplay {
			get {
				string colorSchemeStr = ColorSchemeDebuggerDisplay ();
				return $"U+{Rune.Value:X4} '{Rune.ToString ()}'; {colorSchemeStr}";
			}
		}
	}

// Turns the string into cells, this does not split the 
// contents on a newline if it is present.
internal static List<RuneCell> StringToRuneCells (string str, ColorScheme? colorScheme = null)
{
	List<RuneCell> cells = new List<RuneCell> ();
	foreach (var rune in str.ToRunes ()) {
		cells.Add (new RuneCell { Rune = rune, ColorScheme = colorScheme });
	}
	return cells;
}

/// <summary>
/// Returns the specified line as a List of Rune
/// </summary>
/// <returns>The line.</returns>
/// <param name="line">Line number to retrieve.</param>
public List<RuneCell> GetLine (int line)
{
	if (_lines.Count > 0) {
		if (line < Count) {
			return _lines [line];
		} else {
			return _lines [Count - 1];
		}
	} else {
		_lines.Add (new List<RuneCell> ());
		return _lines [0];
	}
}

@bradwilson
Copy link
Member

@tig I will need a full repro to track this down.

@tig
Copy link
Author

tig commented Nov 16, 2023

@tig I will need a full repro to track this down.

With xUnit 2.5.3 TestObj.Equals gets called.

With xUnit 2.6.1 it does not.

		public class TestObj : IEquatable<TestObj> {
			public char Char { get; set; }

			public bool Equals (TestObj other)
			{
				return other?.Char == Char;
			}
		}


		[Fact]
		public void Repo_xUnit_2821 ()
		{
			List<TestObj> list1 = new List<TestObj> ();
			list1.Add (new TestObj { Char = 'a' });

			List<TestObj> list2 = new List<TestObj> ();
			list2.Add (new TestObj { Char = 'a' });

			Assert.Equal(list1, list2);
		}

@bradwilson
Copy link
Member

bradwilson commented Nov 16, 2023

This looks like a pretty strange edge case that came about because of performance optimizations. We were sort of accidentally getting the right result for the wrong reason previously. Working on a fix now.

bradwilson added a commit to xunit/assert.xunit that referenced this issue Nov 17, 2023
bradwilson added a commit that referenced this issue Nov 17, 2023
bradwilson added a commit that referenced this issue Nov 17, 2023
@bradwilson
Copy link
Member

Available in v2: 2.6.2-pre.15
Available in v3: 0.1.1-pre.325

@tig
Copy link
Author

tig commented Nov 17, 2023

2.6.2-pre

Will you push this to nuget?

image

@bradwilson
Copy link
Member

Not until a final RTM. You can use CI builds from the feedz.io feed, instructions here: https://xunit.net/docs/using-ci-builds

@gioce90
Copy link

gioce90 commented Dec 5, 2023

Hi, is this fixed with 2.6.2 or with a future release? Because in 2.6.2 I think there is still the same (or similar) regression

@bradwilson
Copy link
Member

@gioce90 Yes, the bug specified here was fixed in 2.6.2.

The new bug you opened is a duplicate of a bug that is already fixed and will be shipped in 2.6.3.

@gioce90
Copy link

gioce90 commented Dec 6, 2023

Okay thank you

ViktorHofer added a commit to ViktorHofer/arcade that referenced this issue Dec 8, 2023
…a6..455865ac8

455865ac8 xunit/xunit#2821: Assert.Equal for collections of IEquatable objects don't call custom Equals
9af2c9c12 Clarify names for range comparer
2e6d9b267 Updates for .NET 8 SDK

git-subtree-dir: src/Microsoft.DotNet.XUnitAssert/src
git-subtree-split: 455865ac846c0812e80ffb1c4a46b9d5d35ff828
ericstj added a commit to dotnet/machinelearning that referenced this issue Dec 19, 2023
ericstj added a commit to dotnet/machinelearning that referenced this issue Jan 2, 2024
* Update dependencies from https://github.com/dotnet/arcade build 20230519.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23269.2

* Add dotnet8 nuget feed

* Update dependencies from https://github.com/dotnet/arcade build 20230529.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23279.1

* Update dependencies from https://github.com/dotnet/arcade build 20230602.3

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23302.3

* Update dependencies from https://github.com/dotnet/arcade build 20230609.8

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23309.8

* Update dependencies from https://github.com/dotnet/arcade build 20230616.6

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23316.6

* Update dependencies from https://github.com/dotnet/arcade build 20230622.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23322.2

* Update dependencies from https://github.com/dotnet/arcade build 20230630.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23330.1

* Update dependencies from https://github.com/dotnet/arcade build 20230710.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23360.1

* Update dependencies from https://github.com/dotnet/arcade build 20230714.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23364.2

* Update dependencies from https://github.com/dotnet/arcade build 20230721.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23371.1

* Update dependencies from https://github.com/dotnet/arcade build 20230728.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23378.2

* Update dependencies from https://github.com/dotnet/arcade build 20230804.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23404.2

* Update dependencies from https://github.com/dotnet/arcade build 20230811.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23411.1

* Update dependencies from https://github.com/dotnet/arcade build 20230819.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23419.1

* Update dependencies from https://github.com/dotnet/arcade build 20230825.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23425.2

* Update dependencies from https://github.com/dotnet/arcade build 20230901.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23451.1

* Update dependencies from https://github.com/dotnet/arcade build 20230901.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23451.1

* Update dependencies from https://github.com/dotnet/arcade build 20230913.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23463.1

* Update dependencies from https://github.com/dotnet/arcade build 20230913.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23463.1

* Update dependencies from https://github.com/dotnet/arcade build 20230913.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23463.1

* Update dependencies from https://github.com/dotnet/arcade build 20231008.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23508.1

* Update dependencies from https://github.com/dotnet/arcade build 20231010.4

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23510.4

* Update dependencies from https://github.com/dotnet/arcade build 20231018.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23518.2

* Update dependencies from https://github.com/dotnet/arcade build 20231028.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23528.2

* Update dependencies from https://github.com/dotnet/arcade build 20231103.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23553.1

* Update dependencies from https://github.com/dotnet/arcade build 20231110.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23560.1

* Update dependencies from https://github.com/dotnet/arcade build 20231117.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23567.1

* Fixed version update breaks.

* Update dependencies from https://github.com/dotnet/arcade build 20231122.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23572.2

* Update dependencies from https://github.com/dotnet/arcade build 20231201.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23601.1

* Update dependencies from https://github.com/dotnet/arcade build 20231207.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23607.2

* Update dependencies from https://github.com/dotnet/arcade build 20231215.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23615.2

* Update XUnitVersion

* Update MicrosoftMLOnnxRuntimeVersion to 1.16.3

* Rollback OnnxRuntime and suppress warning

* Update to Xunit with fix for xunit/xunit#2821

* Ensure we pull down 8.0 runtime.

* Update Centos docker containers

* Fix packaging step

* Try including stdint.h to fix missing uint8_t on centos

* Update Centos test queue

* Attempt to use runtime centos-stream8-helix container for tests

* Use centos-stream8-mlnet-helix container for testing

* Undo changes to test data

* Make NETFRAMEWORK ifdef versionless

* Switch back to centos7 for testing

* Revert "Switch back to centos7 for testing"

This reverts commit ab0d41e.

* Update dependencies from https://github.com/dotnet/arcade build 20231221.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23621.2

* Update dependencies from https://github.com/dotnet/arcade build 20231228.1

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XliffTasks , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 9.0.0-beta.23628.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Michael Sharp <misharp@microsoft.com>
ericstj added a commit to dotnet/machinelearning that referenced this issue Jan 5, 2024
michaelgsharp added a commit to dotnet/machinelearning that referenced this issue Jan 9, 2024
* Update dependencies from https://github.com/dotnet/arcade build 20231220.2

Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SignTool , Microsoft.DotNet.SwaggerGenerator.MSBuild , Microsoft.DotNet.XUnitExtensions
 From Version 8.0.0-beta.23265.1 -> To Version 8.0.0-beta.23620.2

* Fixed version update breaks.

* Update XUnitVersion

* Update MicrosoftMLOnnxRuntimeVersion to 1.16.3

* Rollback OnnxRuntime and suppress warning

* Update to Xunit with fix for xunit/xunit#2821

* Update Centos docker containers

* Fix packaging step

* Try including stdint.h to fix missing uint8_t on centos

* Update Centos test queue

* Attempt to use runtime centos-stream8-helix container for tests

* Use centos-stream8-mlnet-helix container for testing

* Undo changes to test data

* Make NETFRAMEWORK ifdef versionless

* Only use semi-colons for NoWarn

* Fix assert by only accessing idx (#6924)

Asserting on `_rowCount <  Utils.Size(_valueBoundaries)` was catching a
case where `_rowCount`'s update was reordered before `_valueBoundaries`

This was unnecessary, since this method doesn't need to use `_rowCount`.

Instead, make the asserts use only `idx` which will be maintained
consistent with the waiter logic in this cache.
�Ensure we only ever use `_rowCount` from the caching thread, so write
reordering won't matter.

* Don't include the SDK in our helix payload (#6918)

* Don't include the SDK in our helix payload

I noticed that the tests included the latest SDK - including the host -
in our helix payloads.

This is a large amount of unnecessary downloads and it also makes it so
we use the latest host on the older frameworks which can fail when the
latest host drops support for distros.

Since our tests shouldn't need the full CLI, remove this from our helix
payloads.

We'll instead get just the runtime we need through `AdditionalDotNetPackage`

* Place Helix downloaded runtime on the PATH

Helix only sets the path when the CLI is included, however we don't
need the CLI.

* Make double assertions compare with tolerance instead of precision (#6923)

Precision might cause small differences to round to a different number.
Instead compare with a tolerance which is not sensitive to rounding.

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Michael Sharp <misharp@microsoft.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
ViktorHofer added a commit to dotnet/arcade that referenced this issue Jan 19, 2024
…a6..141681779

141681779 Missed #nullable enable in AsyncCollectionAsserts
22c89b0ea xunit/xunit#2367: Add IAsyncEnumerable<> overloads (.NET Core 3.0+)
d5c32630a While formatting type names in Assert.Equal/NotEqual, convert generated type names to '<generated>'
d7b807179 Add platform conditionals to support .NET 6 Roslyn Analyzers
6d9024665 xunit/xunit#2850: Assert.Equal failing value-slot collections of different concrete types (also fixed for KeyValuePair keys and values)
1f66b837a xunit/xunit#2811: Add SortedSet and ImmutableSortedSet overloads for Assert.Contains/DoesNotContain
1dab747d3 Update FuncEqualityComparer to throw if GetHashCode is called, and update EqualException/NotEqualException to process it
6e0a7cd70 xunit/xunit#2828: Prefer IEquatable<> over custom collection equality
c35ef46d5 xunit/xunit#2824: Assert.Equal fails with null values in dictionary
455865ac8 xunit/xunit#2821: Assert.Equal for collections of IEquatable objects don't call custom Equals
9af2c9c12 Clarify names for range comparer
2e6d9b267 Updates for .NET 8 SDK

git-subtree-dir: src/Microsoft.DotNet.XUnitAssert/src
git-subtree-split: 141681779e7638887a2ba711ad5407c67b6efe32
ViktorHofer added a commit to dotnet/arcade that referenced this issue Mar 28, 2024
…a6..574aebac4

574aebac4 xunit/xunit#2872: Expand special handling for sets in Assert.Contains/DoesNotContain
3b8edcbf1 xunit/xunit#2880: Update XML documentation for string-based Assert.Equal
d9f8361d2 Consolidate string and span-based Assert.Equal primary implementation
9ad71163e Move span-of-char assertions to StringAsserts and update docs/param names to indicate they're treated like strings
d70b34621 xunit/xunit#2871: Inner exception stack trace is missing from Assert.Collection failure
141681779 Missed #nullable enable in AsyncCollectionAsserts
22c89b0ea xunit/xunit#2367: Add IAsyncEnumerable<> overloads (.NET Core 3.0+)
d5c32630a While formatting type names in Assert.Equal/NotEqual, convert generated type names to '<generated>'
d7b807179 Add platform conditionals to support .NET 6 Roslyn Analyzers
6d9024665 xunit/xunit#2850: Assert.Equal failing value-slot collections of different concrete types (also fixed for KeyValuePair keys and values)
1f66b837a xunit/xunit#2811: Add SortedSet and ImmutableSortedSet overloads for Assert.Contains/DoesNotContain
1dab747d3 Update FuncEqualityComparer to throw if GetHashCode is called, and update EqualException/NotEqualException to process it
6e0a7cd70 xunit/xunit#2828: Prefer IEquatable<> over custom collection equality
c35ef46d5 xunit/xunit#2824: Assert.Equal fails with null values in dictionary
455865ac8 xunit/xunit#2821: Assert.Equal for collections of IEquatable objects don't call custom Equals
9af2c9c12 Clarify names for range comparer
2e6d9b267 Updates for .NET 8 SDK

git-subtree-dir: src/Microsoft.DotNet.XUnitAssert/src
git-subtree-split: 574aebac41dbbbf9e5e98bb9c65c6c5fab9b47f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants