From 7d5d676eac56d2e34fd34ea7508594c6e50ae141 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 7 Nov 2011 01:20:58 +0200 Subject: [PATCH] Infinite packet flood test for debugging the new network layer --- src/test.cpp | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/test.cpp b/src/test.cpp index c1f04b2e..a911f0cb 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -953,10 +953,10 @@ struct TestConnection u16 peer_id_client = 2; #if 0 + /* + Send consequent packets in different order + */ { - /* - Send consequent packets in different order - */ //u8 data1[] = "hello1"; //u8 data2[] = "hello2"; SharedBuffer data1 = SharedBufferFromString("hello1"); @@ -1027,6 +1027,42 @@ struct TestConnection assert(got_exception); } #endif + /* + Send large amounts of packets (infinite test) + */ + { + infostream<<"Sending large amounts of packets (infinite test)"< data1(datasize); + for(u16 i=0; i