Skip to content
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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# editorconfig.org
# top-most EditorConfig file
root = true

# Visual Studio XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
charset = utf-8

# Visual Studio and .NET related XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,stylecop}]
indent_size = 2
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Start ActiveMQ with Docker Compose
run: docker compose up -d activemq

- name: Restore dependencies
run: dotnet restore nms-openwire.sln

- name: Build solution
run: dotnet build nms-openwire.sln --configuration Release --no-restore

- name: Run tests
run: dotnet test test/nms-openwire-test.csproj --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults --filter "TestCategory!=Manual"
env:
NMSTestBroker: localhost
activemqhost: localhost
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: TestResults/*.trx

- name: Stop ActiveMQ
if: always()
run: docker compose down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ nms.sln.startup.json
build/
package/
nms.sln.DotSettings.user
tools/
tools/
.DS_Store
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>12</LangVersion>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
</Project>
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
activemq:
image: apache/activemq-classic:latest
ports:
- "61616:61616"
- "8161:8161"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8161/admin/"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
environment:
- ACTIVEMQ_CONNECTION_USER=guest
- ACTIVEMQ_CONNECTION_PASSWORD=guest
10 changes: 0 additions & 10 deletions docs/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions docs/api/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions docs/api/index.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/articles/intro.md

This file was deleted.

2 changes: 0 additions & 2 deletions docs/articles/toc.yml

This file was deleted.

75 changes: 0 additions & 75 deletions docs/docfx.json

This file was deleted.

Binary file removed docs/images/activemq_logo_icon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions docs/index.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/nms-openwire-docs.csproj

This file was deleted.

24 changes: 0 additions & 24 deletions docs/template/partials/logo.tmpl.partial

This file was deleted.

5 changes: 0 additions & 5 deletions docs/toc.yml

This file was deleted.

16 changes: 11 additions & 5 deletions nms-openwire.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nms-openwire", "src\nms-ope
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nms-openwire-test", "test\nms-openwire-test.csproj", "{D4034BFD-21F1-4836-B0A0-1C4161AB0110}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nms-openwire-docs", "docs\nms-openwire-docs.csproj", "{D0D49AC7-FCD9-4BE6-9A72-310852D473AC}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A3B1E8EF-F189-4DF4-8531-4C37128AA3C3}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
LICENSE.txt = LICENSE.txt
RELEASE.md = RELEASE.md
README.md = README.md
NOTICE.txt = NOTICE.txt
docker-compose.yml = docker-compose.yml
.github\workflows\build.yml = .github\workflows\build.yml
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -23,10 +33,6 @@ Global
{D4034BFD-21F1-4836-B0A0-1C4161AB0110}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4034BFD-21F1-4836-B0A0-1C4161AB0110}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4034BFD-21F1-4836-B0A0-1C4161AB0110}.Release|Any CPU.Build.0 = Release|Any CPU
{D0D49AC7-FCD9-4BE6-9A72-310852D473AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0D49AC7-FCD9-4BE6-9A72-310852D473AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0D49AC7-FCD9-4BE6-9A72-310852D473AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0D49AC7-FCD9-4BE6-9A72-310852D473AC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion src/NmsDefaultDeserializationPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class NmsDefaultDeserializationPolicy : INmsDeserializationPolicy

public bool IsTrustedType(IDestination destination, Type type)
{
var typeName = type.FullName;
var typeName = type?.FullName;
if (typeName == null)
{
return false;
Expand Down
7 changes: 0 additions & 7 deletions src/nms-openwire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Authors>Apache ActiveMQ</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -46,10 +45,4 @@
<PackageReference Include="SharpZipLib" Version="1.3.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Runtime">
<Version>4.3.1</Version>
</PackageReference>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions test/AMQNET366Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public override void SetUp()
[Test, Timeout(30_000)]
public void TestConnection()
{
IConnectionFactory factory = new NMSConnectionFactory(NMSTestSupport.ReplaceEnvVar(connectionUri));
IConnectionFactory factory = new NMSConnectionFactory(ReplaceEnvVar(connectionUri));

using (connection = factory.CreateConnection())
using (connection = factory.CreateConnection("guest", "guest"))
using (ISession session = connection.CreateSession())
{
IDestination destination = SessionUtil.GetDestination(session, "queue://TEST.test.in");
Expand Down
11 changes: 5 additions & 6 deletions test/AMQNET375Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace Apache.NMS.ActiveMQ.Test
{
[TestFixture()]
[TestFixture]
public class AMQNET375Test : NMSTestSupport
{
#region Constants
Expand All @@ -41,7 +41,7 @@ public class AMQNET375Test : NMSTestSupport

#endregion

[TestCase]
[Test, Timeout(20_000)]
public void TestZeroPrefetchConsumerGetsAllMessages()
{
Send(COUNT);
Expand All @@ -53,7 +53,7 @@ public void TestZeroPrefetchConsumerGetsAllMessages()
private void Receive(int numberOfMessages)
{
IConnectionFactory connectionFactory = new NMSConnectionFactory(NMSTestSupport.ReplaceEnvVar(BrokerUri));
using (IConnection connection = connectionFactory.CreateConnection())
using (IConnection connection = connectionFactory.CreateConnection("guest", "guest"))
{
connection.Start();

Expand Down Expand Up @@ -83,8 +83,8 @@ private void Receive(int numberOfMessages)

private void Send(int numberOfMessages)
{
IConnectionFactory connectionFactory = new NMSConnectionFactory(NMSTestSupport.ReplaceEnvVar(BrokerUri));
using (IConnection connection = connectionFactory.CreateConnection())
IConnectionFactory connectionFactory = new NMSConnectionFactory(ReplaceEnvVar(BrokerUri));
using (IConnection connection = connectionFactory.CreateConnection("guest", "guest"))
{
connection.Start();

Expand Down Expand Up @@ -123,4 +123,3 @@ private static void OnConnectionResumed()
}
}
}

Loading
Loading