Skip to content

Commit 4628927

Browse files
Merge pull request #1141 from rabbitmq/lukebakken/fix-appveyor
Fix and update AppVeyor build
2 parents c7e36db + a9a2600 commit 4628927

File tree

12 files changed

+189
-190
lines changed

12 files changed

+189
-190
lines changed

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## RabbitMQ .NET Client
22

33
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/33srpo7owl1h3y4e?svg=true)](https://ci.appveyor.com/project/rabbitmq/rabbitmq-dotnet-client)
4-
[![Travis CI Build Status](https://travis-ci.org/rabbitmq/rabbitmq-dotnet-client.svg?branch=master)](https://travis-ci.org/rabbitmq/rabbitmq-dotnet-client)
54

65
This repository contains source code of the [RabbitMQ .NET client](https://www.rabbitmq.com/dotnet.html).
76
The client is maintained by the [RabbitMQ team at VMware](https://github.com/rabbitmq/).

appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ version: "6.2.0.{build}"
33
platform: Any CPU
44
configuration: Release
55
skip_tags: true
6-
skip_branch_with_pr: true
76
image: Visual Studio 2019
87

98
cache:
109
# Note: this must match the $rabbitmq_installer_path and $erlang_installer_path values in
1110
# tools\appveyor\install.ps1
12-
- "%HOMEDRIVE%%HOMEPATH%\\rabbitmq-server-3.8.5.exe"
13-
- "%HOMEDRIVE%%HOMEPATH%\\otp_win64_23.0.2.exe"
11+
- "%HOMEDRIVE%%HOMEPATH%\\rabbitmq-server-3.9.13.exe"
12+
- "%HOMEDRIVE%%HOMEPATH%\\otp_win64_24.2.1.exe"
1413

1514
install:
1615
- ps: .\tools\appveyor\install.ps1

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ECHO OFF
22
set DOTNET_CLI_TELEMETRY_OPTOUT=1
33
dotnet restore .\RabbitMQDotNetClient.sln
4-
dotnet run -p .\projects\Apigen\Apigen.csproj --apiName:AMQP_0_9_1 .\projects\specs\amqp0-9-1.stripped.xml .\gensrc\autogenerated-api-0-9-1.cs
4+
dotnet run --project .\projects\Apigen\Apigen.csproj --apiName:AMQP_0_9_1 .\projects\specs\amqp0-9-1.stripped.xml .\gensrc\autogenerated-api-0-9-1.cs
55
dotnet build .\RabbitMQDotNetClient.sln

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
cd "$script_dir"
1515

1616
dotnet restore ./RabbitMQDotNetClient.sln
17-
dotnet run -p ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 \
17+
dotnet run --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 \
1818
./projects/specs/amqp0-9-1.stripped.xml \
1919
./gensrc/autogenerated-api-0-9-1.cs
2020
dotnet build ./RabbitMQDotNetClient.sln

projects/RabbitMQ.Client/client/impl/IncomingCommand.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@ public void Dispose()
2929
ArrayPool<byte>.Shared.Return(_rentedArray);
3030
}
3131
}
32+
33+
public override string ToString()
34+
{
35+
return $"IncomingCommand Method={Method.ProtocolMethodName}, Body.Length={Body.Length}";
36+
}
3237
}
3338
}

projects/Unit/APIApproval.Approve.verified.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/rabbitmq/rabbitmq-dotnet-client.git")]
12
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Unit, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d20ec856aeeb8c3153a77faa2d80e6e43b5db93224a20cc7ae384f65f142e89730e2ff0fcc5d578bbe96fa98a7196c77329efdee4579b3814c0789e5a39b51df6edd75b602a33ceabdfcf19a3feb832f31d8254168cd7ba5700dfbca301fbf8db614ba41ba18474de0a5f4c2d51c995bc3636c641c8cbe76f45717bfcb943b5")]
23
namespace RabbitMQ.Client
34
{
@@ -235,6 +236,8 @@ namespace RabbitMQ.Client
235236
public interface IAutorecoveringConnection : RabbitMQ.Client.IConnection, RabbitMQ.Client.INetworkConnection, System.IDisposable
236237
{
237238
event System.EventHandler<RabbitMQ.Client.Events.ConnectionRecoveryErrorEventArgs> ConnectionRecoveryError;
239+
event System.EventHandler<RabbitMQ.Client.Events.ConsumerTagChangedAfterRecoveryEventArgs> ConsumerTagChangeAfterRecovery;
240+
event System.EventHandler<RabbitMQ.Client.Events.QueueNameChangedAfterRecoveryEventArgs> QueueNameChangeAfterRecovery;
238241
event System.EventHandler<System.EventArgs> RecoverySucceeded;
239242
}
240243
public interface IBasicConsumer

projects/Unit/Fixtures.cs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ internal Process ExecCommand(string command, string args)
504504
return ExecCommand(command, args, null);
505505
}
506506

507-
internal Process ExecCommand(string ctl, string args, string changeDirTo)
507+
internal Process ExecCommand(string cmd, string args, string changeDirTo)
508508
{
509509
var proc = new Process
510510
{
@@ -514,31 +514,25 @@ internal Process ExecCommand(string ctl, string args, string changeDirTo)
514514
UseShellExecute = false
515515
}
516516
};
517-
if(changeDirTo != null)
517+
518+
if (changeDirTo != null)
518519
{
519520
proc.StartInfo.WorkingDirectory = changeDirTo;
520521
}
521522

522-
string cmd;
523-
if(IsRunningOnMonoOrDotNetCore()) {
524-
cmd = ctl;
525-
} else {
526-
cmd = "cmd.exe";
527-
args = $"/c \"\"{ctl}\" {args}\"";
528-
}
529-
530523
try {
531524
proc.StartInfo.FileName = cmd;
532525
proc.StartInfo.Arguments = args;
533526
proc.StartInfo.RedirectStandardError = true;
534527
proc.StartInfo.RedirectStandardOutput = true;
535528

536529
proc.Start();
537-
string stderr = proc.StandardError.ReadToEnd();
538530
proc.WaitForExit();
531+
532+
string stderr = proc.StandardError.ReadToEnd();
539533
if (stderr.Length > 0 || proc.ExitCode > 0)
540534
{
541-
string stdout = proc.StandardOutput.ReadToEnd();
535+
string stdout = proc.StandardOutput.ReadToEnd();
542536
ReportExecFailure(cmd, args, $"{stderr}\n{stdout}");
543537
}
544538

@@ -649,21 +643,21 @@ internal List<ConnectionInfo> ListConnections()
649643
internal void CloseConnection(IConnection conn)
650644
{
651645
ConnectionInfo ci = ListConnections().First(x => conn.ClientProvidedName == x.Name);
652-
CloseConnection(ci.Pid);
646+
CloseConnection(conn.ClientProvidedName, ci.Pid);
653647
}
654648

655649
internal void CloseAllConnections()
656650
{
657651
List<ConnectionInfo> cs = ListConnections();
658652
foreach(ConnectionInfo c in cs)
659653
{
660-
CloseConnection(c.Pid);
654+
CloseConnection(c.Name, c.Pid);
661655
}
662656
}
663657

664-
internal void CloseConnection(string pid)
658+
internal void CloseConnection(string name, string pid)
665659
{
666-
ExecRabbitMQCtl($"close_connection \"{pid}\" \"Closed via rabbitmqctl\"");
660+
ExecRabbitMQCtl($"close_connection \"{pid}\" \"{name} {pid} closed via rabbitmqctl\"");
667661
}
668662

669663
internal void RestartRabbitMQ()

0 commit comments

Comments
 (0)