@@ -11535,4 +11535,107 @@
11535
11535
),
11536
11536
},
11537
11537
),
11538
+ Scenario (
11539
+ "scenario52" ,
11540
+ "Repeatedly stop and start transfer, except paused events to be present all the time" ,
11541
+ {
11542
+ "DROP_PEER_REN" : ActionList (
11543
+ [
11544
+ action .ConfigureNetwork (rate = "4mbit" ),
11545
+ action .Start ("DROP_PEER_REN" ),
11546
+ action .WaitForAnotherPeer ("DROP_PEER_STIMPY" ),
11547
+ action .NewTransfer ("DROP_PEER_STIMPY" , ["/tmp/testfile-big" ]),
11548
+ action .Wait (
11549
+ event .Queued (
11550
+ 0 ,
11551
+ "DROP_PEER_STIMPY" ,
11552
+ {
11553
+ event .File (
11554
+ FILES ["testfile-big" ].id , "testfile-big" , 10485760
11555
+ ),
11556
+ },
11557
+ )
11558
+ ),
11559
+ action .Repeated (
11560
+ [
11561
+ action .WaitAndIgnoreExcept (
11562
+ [event .Paused (0 , FILES ["testfile-big" ].id )]
11563
+ ),
11564
+ action .Sleep (0.3 ),
11565
+ action .NetworkRefresh (),
11566
+ ],
11567
+ times = 40 ,
11568
+ ),
11569
+ action .WaitAndIgnoreExcept (
11570
+ [event .FinishFileUploaded (0 , FILES ["testfile-big" ].id )]
11571
+ ),
11572
+ action .ExpectCancel ([0 ], True ),
11573
+ action .NoEvent (),
11574
+ action .Stop (),
11575
+ ]
11576
+ ),
11577
+ "DROP_PEER_STIMPY" : ActionList (
11578
+ [
11579
+ action .ConfigureNetwork (rate = "4mbit" ),
11580
+ action .Start (
11581
+ "DROP_PEER_STIMPY" ,
11582
+ dbpath = "/tmp/db/50-stimpy.sqlite" ,
11583
+ ),
11584
+ action .Wait (
11585
+ event .Receive (
11586
+ 0 ,
11587
+ "DROP_PEER_REN" ,
11588
+ {
11589
+ event .File (
11590
+ FILES ["testfile-big" ].id , "testfile-big" , 10485760
11591
+ ),
11592
+ },
11593
+ )
11594
+ ),
11595
+ action .Download (
11596
+ 0 ,
11597
+ FILES ["testfile-big" ].id ,
11598
+ "/tmp/received/50" ,
11599
+ ),
11600
+ action .Repeated (
11601
+ [
11602
+ action .WaitForOneOf (
11603
+ [
11604
+ event .Start (0 , FILES ["testfile-big" ].id , None ),
11605
+ event .ChecksumStarted (0 , FILES ["testfile-big" ].id ),
11606
+ ]
11607
+ ),
11608
+ action .Stop (),
11609
+ action .WaitAndIgnoreExcept (
11610
+ [event .Paused (0 , FILES ["testfile-big" ].id )]
11611
+ ),
11612
+ action .Start (
11613
+ "DROP_PEER_STIMPY" ,
11614
+ dbpath = "/tmp/db/50-stimpy.sqlite" ,
11615
+ ),
11616
+ ],
11617
+ times = 40 ,
11618
+ ),
11619
+ action .WaitAndIgnoreExcept (
11620
+ [
11621
+ event .FinishFileDownloaded (
11622
+ 0 ,
11623
+ FILES ["testfile-big" ].id ,
11624
+ "/tmp/received/50/testfile-big" ,
11625
+ )
11626
+ ]
11627
+ ),
11628
+ action .CheckDownloadedFiles (
11629
+ [
11630
+ action .File ("/tmp/received/50/testfile-big" , 10485760 ),
11631
+ ],
11632
+ ),
11633
+ action .CancelTransferRequest ([0 ]),
11634
+ action .ExpectCancel ([0 ], False ),
11635
+ action .NoEvent (),
11636
+ action .Stop (),
11637
+ ]
11638
+ ),
11639
+ },
11640
+ ),
11538
11641
]
0 commit comments