Skip to content

Commit 90d8ac3

Browse files
committed
wip fixing flaky test
1 parent c3f3c6e commit 90d8ac3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Extensions/Json/Cosmos.DataTransfer.JsonExtension.UnitTests/JsonFileRoundTripTests.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ public async Task WriteAsync_fromFolderReadAsync_ProducesExpectedCombinedFile()
5151
{ "Indented", "true" },
5252
});
5353

54-
await output.WriteAsync(input.ReadAsync(sourceConfig, NullLogger.Instance), sinkConfig, input, NullLogger.Instance);
54+
var readInput = await input.ReadAsync(sourceConfig, NullLogger.Instance).ToListAsync();
55+
CollectionAssert.AreEqual(new int[] { 1, 2, 3, 4},
56+
readInput.Select(x => (int)x.GetValue("id")!).ToArray());
57+
58+
await output.WriteAsync(readInput.ToAsyncEnumerable(), sinkConfig, input, NullLogger.Instance);
59+
Console.WriteLine( await File.ReadAllTextAsync(fileOut));
5560

5661
bool areEqual = JToken.DeepEquals(JToken.Parse(await File.ReadAllTextAsync(fileCompare)), JToken.Parse(await File.ReadAllTextAsync(fileOut)));
5762
Assert.IsTrue(areEqual);

0 commit comments

Comments
 (0)