From: Perttu Ahola Date: Sun, 6 Nov 2011 23:20:58 +0000 (+0200) Subject: Infinite packet flood test for debugging the new network layer X-Git-Tag: 0.3.1~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7d5d676eac56d2e34fd34ea7508594c6e50ae141;p=oweals%2Fminetest.git Infinite packet flood test for debugging the new network layer --- diff --git a/src/test.cpp b/src/test.cpp index c1f04b2ef..a911f0cb1 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