Skip to content

Fix and update AppVeyor build #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## RabbitMQ .NET Client

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

This repository contains source code of the [RabbitMQ .NET client](https://www.rabbitmq.com/dotnet.html).
The client is maintained by the [RabbitMQ team at VMware](https://github.com/rabbitmq/).
Expand Down
5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ version: "6.2.0.{build}"
platform: Any CPU
configuration: Release
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2019

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

install:
- ps: .\tools\appveyor\install.ps1
Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@ECHO OFF
set DOTNET_CLI_TELEMETRY_OPTOUT=1
dotnet restore .\RabbitMQDotNetClient.sln
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
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
dotnet build .\RabbitMQDotNetClient.sln
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
cd "$script_dir"

dotnet restore ./RabbitMQDotNetClient.sln
dotnet run -p ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 \
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
dotnet build ./RabbitMQDotNetClient.sln
5 changes: 5 additions & 0 deletions projects/RabbitMQ.Client/client/impl/IncomingCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ public void Dispose()
ArrayPool<byte>.Shared.Return(_rentedArray);
}
}

public override string ToString()
{
return $"IncomingCommand Method={Method.ProtocolMethodName}, Body.Length={Body.Length}";
}
}
}
3 changes: 3 additions & 0 deletions projects/Unit/APIApproval.Approve.verified.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/rabbitmq/rabbitmq-dotnet-client.git")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Unit, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d20ec856aeeb8c3153a77faa2d80e6e43b5db93224a20cc7ae384f65f142e89730e2ff0fcc5d578bbe96fa98a7196c77329efdee4579b3814c0789e5a39b51df6edd75b602a33ceabdfcf19a3feb832f31d8254168cd7ba5700dfbca301fbf8db614ba41ba18474de0a5f4c2d51c995bc3636c641c8cbe76f45717bfcb943b5")]
namespace RabbitMQ.Client
{
Expand Down Expand Up @@ -235,6 +236,8 @@ namespace RabbitMQ.Client
public interface IAutorecoveringConnection : RabbitMQ.Client.IConnection, RabbitMQ.Client.INetworkConnection, System.IDisposable
{
event System.EventHandler<RabbitMQ.Client.Events.ConnectionRecoveryErrorEventArgs> ConnectionRecoveryError;
event System.EventHandler<RabbitMQ.Client.Events.ConsumerTagChangedAfterRecoveryEventArgs> ConsumerTagChangeAfterRecovery;
event System.EventHandler<RabbitMQ.Client.Events.QueueNameChangedAfterRecoveryEventArgs> QueueNameChangeAfterRecovery;
event System.EventHandler<System.EventArgs> RecoverySucceeded;
}
public interface IBasicConsumer
Expand Down
26 changes: 10 additions & 16 deletions projects/Unit/Fixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ internal Process ExecCommand(string command, string args)
return ExecCommand(command, args, null);
}

internal Process ExecCommand(string ctl, string args, string changeDirTo)
internal Process ExecCommand(string cmd, string args, string changeDirTo)
{
var proc = new Process
{
Expand All @@ -514,31 +514,25 @@ internal Process ExecCommand(string ctl, string args, string changeDirTo)
UseShellExecute = false
}
};
if(changeDirTo != null)

if (changeDirTo != null)
{
proc.StartInfo.WorkingDirectory = changeDirTo;
}

string cmd;
if(IsRunningOnMonoOrDotNetCore()) {
cmd = ctl;
} else {
cmd = "cmd.exe";
args = $"/c \"\"{ctl}\" {args}\"";
}

try {
proc.StartInfo.FileName = cmd;
proc.StartInfo.Arguments = args;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;

proc.Start();
string stderr = proc.StandardError.ReadToEnd();
proc.WaitForExit();

string stderr = proc.StandardError.ReadToEnd();
if (stderr.Length > 0 || proc.ExitCode > 0)
{
string stdout = proc.StandardOutput.ReadToEnd();
string stdout = proc.StandardOutput.ReadToEnd();
ReportExecFailure(cmd, args, $"{stderr}\n{stdout}");
}

Expand Down Expand Up @@ -649,21 +643,21 @@ internal List<ConnectionInfo> ListConnections()
internal void CloseConnection(IConnection conn)
{
ConnectionInfo ci = ListConnections().First(x => conn.ClientProvidedName == x.Name);
CloseConnection(ci.Pid);
CloseConnection(conn.ClientProvidedName, ci.Pid);
}

internal void CloseAllConnections()
{
List<ConnectionInfo> cs = ListConnections();
foreach(ConnectionInfo c in cs)
{
CloseConnection(c.Pid);
CloseConnection(c.Name, c.Pid);
}
}

internal void CloseConnection(string pid)
internal void CloseConnection(string name, string pid)
{
ExecRabbitMQCtl($"close_connection \"{pid}\" \"Closed via rabbitmqctl\"");
ExecRabbitMQCtl($"close_connection \"{pid}\" \"{name} {pid} closed via rabbitmqctl\"");
}

internal void RestartRabbitMQ()
Expand Down
Loading