diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-01 20:21:55 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2024-05-02 21:57:20 +0200 |
commit | 25fe0ff7fd7d03e7f4108d361826cd91c038b89c (patch) | |
tree | 74e0c9cf2cca18d795e235e7045d50096d95c232 /test | |
parent | 61f745b3c57e4fe78bea8f8a7a48923b364dd874 (diff) |
Network: reuse stream numbers after closing
Diffstat (limited to 'test')
-rw-r--r-- | test/network.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/network.test b/test/network.test index 3df7376..93f9743 100644 --- a/test/network.test +++ b/test/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 |