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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]