Copilot commented on code in PR #6452:
URL: https://github.com/apache/ignite-3/pull/6452#discussion_r2285595298


##########
modules/platforms/dotnet/Apache.Ignite.Tests/Table/SchemaUpdateTest.cs:
##########
@@ -83,12 +83,26 @@ public async Task TestFailedSchemaLoadTaskIsRetried()
         var schemas = table.GetFieldValue<IDictionary<int, 
Task<Schema>>>("_schemas");
 
         // First operation fails because server drops connection.
-        Assert.ThrowsAsync<IgniteClientConnectionException>(async () => await 
view.UpsertAsync(null, new IgniteTuple { ["id"] = 1 }));
+        bool firstOpFailed = false;
+        try
+        {
+            await view.UpsertAsync(null, new IgniteTuple { ["id"] = 1 });
+            Console.WriteLine("Upsert success.");
+        }
+        catch (IgniteClientConnectionException expected)
+        {
+            firstOpFailed = true;
+            Console.WriteLine($"Upsert fail: {expected.Message}");

Review Comment:
   Console.WriteLine calls should be removed from unit tests. Consider using 
the test framework's output mechanism or removing these debug statements 
entirely.
   ```suggestion
               TestContext.WriteLine("Upsert success.");
           }
           catch (IgniteClientConnectionException expected)
           {
               firstOpFailed = true;
               TestContext.WriteLine($"Upsert fail: {expected.Message}");
   ```



##########
modules/platforms/dotnet/Apache.Ignite.Tests/Table/SchemaUpdateTest.cs:
##########
@@ -83,12 +83,26 @@ public async Task TestFailedSchemaLoadTaskIsRetried()
         var schemas = table.GetFieldValue<IDictionary<int, 
Task<Schema>>>("_schemas");
 
         // First operation fails because server drops connection.
-        Assert.ThrowsAsync<IgniteClientConnectionException>(async () => await 
view.UpsertAsync(null, new IgniteTuple { ["id"] = 1 }));
+        bool firstOpFailed = false;
+        try
+        {
+            await view.UpsertAsync(null, new IgniteTuple { ["id"] = 1 });
+            Console.WriteLine("Upsert success.");
+        }
+        catch (IgniteClientConnectionException expected)
+        {
+            firstOpFailed = true;
+            Console.WriteLine($"Upsert fail: {expected.Message}");

Review Comment:
   Console.WriteLine calls should be removed from unit tests. Consider using 
the test framework's output mechanism or removing these debug statements 
entirely.
   ```suggestion
               TestContext.WriteLine("Upsert success.");
           }
           catch (IgniteClientConnectionException expected)
           {
               firstOpFailed = true;
               TestContext.WriteLine($"Upsert fail: {expected.Message}");
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to