@@ -404,10 +404,45 @@ public async Task TestPublisherConfirmationThrottling()
404
404
Assert . Equal ( TotalMessageCount , publishCount ) ;
405
405
}
406
406
407
+ [ SkippableFact ]
408
+ [ Trait ( "Category" , "Toxiproxy" ) ]
409
+ public async Task TestRpcContinuationTimeout_GH1802 ( )
410
+ {
411
+ Skip . IfNot ( AreToxiproxyTestsEnabled , "RABBITMQ_TOXIPROXY_TESTS is not set, skipping test" ) ;
412
+
413
+ ConnectionFactory cf = CreateConnectionFactory ( ) ;
414
+ cf . Endpoint = new AmqpTcpEndpoint ( IPAddress . Loopback . ToString ( ) , _proxyPort ) ;
415
+ cf . ContinuationTimeout = TimeSpan . FromSeconds ( 1 ) ;
416
+ cf . AutomaticRecoveryEnabled = false ;
417
+ cf . TopologyRecoveryEnabled = false ;
418
+
419
+ await using IConnection conn = await cf . CreateConnectionAsync ( ) ;
420
+ await using IChannel ch = await conn . CreateChannelAsync ( ) ;
421
+
422
+ string toxicName = $ "rmq-localhost-bandwidth-{ Now } -{ GenerateShortUuid ( ) } ";
423
+ var bandwidthToxic = new BandwidthToxic
424
+ {
425
+ Name = toxicName
426
+ } ;
427
+ bandwidthToxic . Attributes . Rate = 0 ;
428
+ bandwidthToxic . Toxicity = 1.0 ;
429
+ bandwidthToxic . Stream = ToxicDirection . DownStream ;
430
+
431
+ Task < BandwidthToxic > addToxicTask = _toxiproxyManager . AddToxicAsync ( bandwidthToxic ) ;
432
+
433
+ await Task . Delay ( TimeSpan . FromSeconds ( 1 ) ) ;
434
+
435
+ ch . ContinuationTimeout = TimeSpan . FromMilliseconds ( 5 ) ;
436
+ QueueDeclareOk q = await ch . QueueDeclareAsync ( ) ;
437
+ }
438
+
407
439
private bool AreToxiproxyTestsEnabled
408
440
{
409
441
get
410
442
{
443
+ // TODO rabbitmq/rabbitmq-dotnet-client#1802
444
+ return true ;
445
+ /*
411
446
string s = Environment.GetEnvironmentVariable("RABBITMQ_TOXIPROXY_TESTS");
412
447
413
448
if (string.IsNullOrEmpty(s))
@@ -421,6 +456,7 @@ private bool AreToxiproxyTestsEnabled
421
456
}
422
457
423
458
return false;
459
+ */
424
460
}
425
461
}
426
462
}
0 commit comments