Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: tests/standalone/io/raw_datagram_socket_test.dart

Issue 1381233003: Increase the datagram receive buffer on Windows to 64k (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/bin/eventhandler_win.cc ('K') | « runtime/bin/eventhandler_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_datagram_socket_test.dart
diff --git a/tests/standalone/io/raw_datagram_socket_test.dart b/tests/standalone/io/raw_datagram_socket_test.dart
index 9b952d6762882c597539673073ecfae6f48d1b9a..c9f5ccc2f273f4b18007562d7bd92db447c595ee 100644
--- a/tests/standalone/io/raw_datagram_socket_test.dart
+++ b/tests/standalone/io/raw_datagram_socket_test.dart
@@ -194,7 +194,7 @@ testLoopbackMulticast() {
}
}
-testSendReceive(InternetAddress bindAddress) {
+testSendReceive(InternetAddress bindAddress, int dataSize) {
asyncStart();
var total = 1000;
@@ -218,7 +218,7 @@ testSendReceive(InternetAddress bindAddress) {
}
Uint8List createDataPackage(int seq) {
- var data = new Uint8List(1000);
+ var data = new Uint8List(dataSize);
(new ByteData.view(data.buffer, 0, 4)).setUint32(0, seq);
return data;
}
@@ -236,7 +236,7 @@ testSendReceive(InternetAddress bindAddress) {
// Send a datagram acknowledging the received sequence.
int bytes = sender.send(
createDataPackage(seq), bindAddress, receiver.port);
- Expect.isTrue(bytes == 0 || bytes == 1000);
+ Expect.isTrue(bytes == 0 || bytes == dataSize);
}
void sendAck(address, port) {
@@ -318,6 +318,8 @@ main() {
}
testBroadcast();
testLoopbackMulticast();
- testSendReceive(InternetAddress.LOOPBACK_IP_V4);
- testSendReceive(InternetAddress.LOOPBACK_IP_V6);
+ testSendReceive(InternetAddress.LOOPBACK_IP_V4, 1000);
+ testSendReceive(InternetAddress.LOOPBACK_IP_V6, 1000);
+ testSendReceive(InternetAddress.LOOPBACK_IP_V4, 32 * 1024);
+ testSendReceive(InternetAddress.LOOPBACK_IP_V6, 32 * 1024);
kustermann 2015/10/02 15:36:58 Is it possible to test this with a size of "64kb -
Søren Gjesse 2015/10/06 07:01:42 Added a test for size 64k - 32.
}
« runtime/bin/eventhandler_win.cc ('K') | « runtime/bin/eventhandler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698