You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ptupitsyn (via GitHub)" <gi...@apache.org> on 2025/10/15 08:49:27 UTC

[PR] IGNITE-26654 .NET: Fix TestUpsertAllBufferOverflow flakiness [ignite-3]

ptupitsyn opened a new pull request, #6775:
URL: https://github.com/apache/ignite-3/pull/6775

   (no comment)


-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-26654 .NET: Fix TestUpsertAllBufferOverflow flakiness [ignite-3]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6775:
URL: https://github.com/apache/ignite-3/pull/6775#discussion_r2431681155


##########
modules/platforms/dotnet/Apache.Ignite.Tests/Table/RecordViewBinaryTests.cs:
##########
@@ -616,14 +616,15 @@ public async Task TestUpsertAllMany()
         [Test]
         public void TestUpsertAllBufferOverflow()
         {
-            int count = 50_000;
-            string val = new string('x', 100_000);
+            int count = 25;
+            string val = new string('x', 100_000_000);
 
             var tuples = Enumerable.Range(0, count)
                 .Select(id => new IgniteTuple(2) { [KeyCol] = (long)id, [ValCol] = val })
                 .ToList();
 
-            Assert.ThrowsAsync<InternalBufferOverflowException>(async () => await TupleView.UpsertAllAsync(null, tuples));
+            var ex = Assert.ThrowsAsync<InternalBufferOverflowException>(async () => await TupleView.UpsertAllAsync(null, tuples));
+            Assert.AreEqual("Buffer can't be larger than 2147483591 bytes.", ex.Message);

Review Comment:
   The hardcoded error message makes the test brittle to message changes. Consider using a more flexible assertion like checking if the message contains key terms or using a constant for the expected message.
   ```suggestion
               StringAssert.Contains("Buffer can't be larger", ex.Message);
   ```



##########
modules/platforms/dotnet/Apache.Ignite.Tests/Table/RecordViewBinaryTests.cs:
##########
@@ -616,14 +616,15 @@ public async Task TestUpsertAllMany()
         [Test]
         public void TestUpsertAllBufferOverflow()
         {
-            int count = 50_000;
-            string val = new string('x', 100_000);
+            int count = 25;
+            string val = new string('x', 100_000_000);

Review Comment:
   The string size of 100 million characters may cause excessive memory usage during test execution. Consider using a more conservative size that still triggers the buffer overflow but is less resource-intensive.
   ```suggestion
               string val = new string('x', 1_000_000); // Reduced size to 1 million chars (~2MB per tuple)
   ```



-- 
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-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-26654 .NET: Fix TestUpsertAllBufferOverflow flakiness [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn merged PR #6775:
URL: https://github.com/apache/ignite-3/pull/6775


-- 
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-unsubscribe@ignite.apache.org

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