diff options
-rw-r--r-- | network.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/network.test b/network.test index 3df7376..93f9743 100644 --- a/network.test +++ b/network.test @@ -135,8 +135,10 @@ test LargeData: for i in [0..10]: with p1: + # Create blob with (i * 1000) bytes send "store blob" for j in [1 .. i * 10]: + # 100 bytes each line send "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789" send "" expect /store-done (blake2#[0-9a-f]*)/ capture ref @@ -144,3 +146,33 @@ test LargeData: send "test-message-send 1 $ref" expect /test-message-send done/ expect /test-message-received blob ${i*1000} $ref/ from p2 + + +test ManyStreams: + spawn as p1 + spawn as p2 + send "create-identity Device1" to p1 + send "create-identity Device2" to p2 + send "start-server" to p1 + send "start-server" to p2 + expect from p1: + /peer 1 addr ${p2.node.ip} 29665/ + /peer 1 id Device2/ + expect from p2: + /peer 1 addr ${p1.node.ip} 29665/ + /peer 1 id Device1/ + + for i in [0..100]: + with p1: + # Create blob with 1000 bytes + decimal i + send "store blob" + for j in [1 .. 10]: + # 100 bytes each line + send "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789" + send "$i" + send "" + expect /store-done (blake2#[0-9a-f]*)/ capture ref + + send "test-message-send 1 $ref" + expect /test-message-send done/ + expect /test-message-received blob 100[2-4] $ref/ from p2 |