Skip to content

Commit 8ae942b

Browse files
Merge branch 'stable'
2 parents 6197cce + 5054cc9 commit 8ae942b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

projects/client/Unit/RabbitMQ.Client.Unit.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<!-- Warning! This file contains important customizations. Using Visual Studio to edit project's properties might break things. -->
44
<!-- Props file -->
@@ -45,7 +45,8 @@
4545
</PropertyGroup>
4646
<Target Name="ImportSSL" Condition="$(SSLAvail)">
4747
<!-- import cacert into certmgr -->
48-
<Exec Command="CertMgr /add $(SSLCertsDir)/testca/cacert.cer /s root" />
48+
<!-- <Exec Command="certmgr -c -add -s $(SSLCertsDir)\testca\cacert.cer -r localMachine Root" /> -->
49+
<Exec Command="certutil -addstore Root $(SSLCertsDir)\testca\cacert.cer" />
4950
</Target>
5051
<!-- Decide whether we need to set TEMP under mono -->
5152
<PropertyGroup>
@@ -147,4 +148,4 @@
147148
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
148149
<!-- Custom BeforeClean -->
149150
<Target Name="BeforeClean" DependsOnTargets="CleanTestResults" />
150-
</Project>
151+
</Project>

projects/client/Unit/src/unit/TestSubscription.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ public void TestConsumerCancellationNotification()
6666
var q = Guid.NewGuid().ToString();
6767
this.Model.QueueDeclare(queue: q, durable: false, exclusive: false, autoDelete: false, arguments: null);
6868
var sub = new Subscription(this.Model, q);
69-
this.Model.QueueDelete(q);
69+
var latch = new ManualResetEvent(false);
7070
sub.Consumer.ConsumerCancelled += (_sender, _args) =>
7171
{
7272
sub.Close();
73+
latch.Set();
74+
Conn.Close();
7375
};
76+
this.Model.QueueDelete(q);
77+
Wait(latch, TimeSpan.FromSeconds(4));
7478
}
7579
}
7680
}

0 commit comments

Comments
 (0)