Skip to content

Commit

Permalink
a possible fix for random progress issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ersan Bozduman committed May 17, 2024
1 parent 58be7f9 commit d764cab
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Minio.Functional.Tests/FunctionalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3556,14 +3556,6 @@ internal static async Task PutObject_Test10(IMinioClient minio)
{
percentage = progressReport.Percentage;
totalBytesTransferred = progressReport.TotalBytesTransferred;
// Console.WriteLine(
// $"PutObject_Test10 - Percentage: {progressReport.Percentage}% TotalBytesTransferred: {progressReport.TotalBytesTransferred} bytes");
// if (progressReport.Percentage != 100)
// {
// var topPosition = Console.CursorTop > 0 ? Console.CursorTop - 1 : Console.CursorTop;
// Console.SetCursorPosition(0, topPosition);
// }
// else Console.WriteLine();
});
var args = new Dictionary<string, string>
(StringComparer.Ordinal)
Expand All @@ -3578,6 +3570,11 @@ internal static async Task PutObject_Test10(IMinioClient minio)
await Setup_Test(minio, bucketName).ConfigureAwait(false);
_ = await PutObject_Tester(minio, bucketName, objectName, null, contentType, 0, null,
rsg.GenerateStreamFromSeed(64 * MB), progress).ConfigureAwait(false);
progress = new Progress<ProgressReport>(progressReport =>
{
percentage = progressReport.Percentage;
totalBytesTransferred = progressReport.TotalBytesTransferred;
});
Assert.IsTrue(percentage == 100);
Assert.IsTrue(totalBytesTransferred == 64 * MB);
new MintLogger(nameof(PutObject_Test10), putObjectSignature,
Expand Down

0 comments on commit d764cab

Please sign in to comment.