Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Bug/sevice bus completes messages #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 8 additions & 5 deletions Liquid.All.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1000
# Visual Studio Version 16
VisualStudioVersion = 16.0.29728.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.Base", "src\Liquid.Base\Liquid.Base.csproj", "{C53B53BE-BA7D-4C74-B49F-23894B6AA5A6}"
EndProject
Expand Down Expand Up @@ -49,9 +49,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.Domain.Tests", "test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.Tests", "test\Liquid.Tests\Liquid.Tests.csproj", "{6BA7DC4B-0F66-415A-AE74-5DEA5D3943D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.OnAzure.Tests", "test\Liquid.OnAzure.Tests\Liquid.OnAzure.Tests.csproj", "{9DEA4109-7542-40D5-9CCF-A673C9787E6D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.OnAzure.IntegrationTests", "test\Liquid.OnAzure.Tests\Liquid.OnAzure.IntegrationTests.csproj", "{9DEA4109-7542-40D5-9CCF-A673C9787E6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Liquid.Runtime.Tests", "test\Liquid.Runtime.Tests\Liquid.Runtime.Tests.csproj", "{83C12AC3-1AE7-4297-B414-347790EF32A3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Liquid.Runtime.Tests", "test\Liquid.Runtime.Tests\Liquid.Runtime.Tests.csproj", "{83C12AC3-1AE7-4297-B414-347790EF32A3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OnAzure.IntegrationTests", "OnAzure.IntegrationTests", "{C8A918D5-2B9D-4A57-8902-FA92F0C7193B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -142,8 +144,9 @@ Global
{5279F425-0A2C-4889-968D-FFEB25975453} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
{90CF0830-CD3C-4DD7-8C90-584772885BE0} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
{6BA7DC4B-0F66-415A-AE74-5DEA5D3943D5} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
{9DEA4109-7542-40D5-9CCF-A673C9787E6D} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
{9DEA4109-7542-40D5-9CCF-A673C9787E6D} = {C8A918D5-2B9D-4A57-8902-FA92F0C7193B}
{83C12AC3-1AE7-4297-B414-347790EF32A3} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
{C8A918D5-2B9D-4A57-8902-FA92F0C7193B} = {6A0B6B3D-15FE-4C0B-97A1-7897E31C0C4E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1E0953B7-A30F-4440-9719-22CA017677B5}
Expand Down
12 changes: 11 additions & 1 deletion src/Liquid.OnAzure/MessageBuses/ServiceBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public override void Initialize()
ProcessSubscription();
}

public void ProcessSubscriptione()
{
throw new NotImplementedException();
}

/// <summary>
/// Implementation of connection service bus
/// </summary>
Expand Down Expand Up @@ -90,7 +95,12 @@ public void ProcessQueue()
try
{
InvokeProcess(method, message.Body);
await queueReceiver.CompleteAsync(message.SystemProperties.LockToken);

if (queueReceiver.ReceiveMode == ReceiveMode.PeekLock)
{
await queueReceiver.CompleteAsync(message.SystemProperties.LockToken);
}

}
catch (Exception exRegister)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
using NSubstitute;
using Xunit;

namespace Liquid.OnAzure.Tests
namespace Liquid.OnAzure.IntegrationTests
{
public class AzureBlobTests : IDisposable
public class AzureBlobIntegrationTests : IDisposable
{
private const string ContentType = "text/plain";
private const string DefaultConnectionString = "UseDevelopmentStorage=true";
Expand All @@ -37,7 +37,7 @@ public class AzureBlobTests : IDisposable

private readonly AzureBlob _sut;

public AzureBlobTests()
public AzureBlobIntegrationTests()
{
Workbench.Instance.Reset();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using Xunit;

namespace Liquid.OnAzure.IntegrationTests.MessageBuses
{
public class ServiceBusIntegrationTest
{

[Fact]
public void InitializeWhenThrowsException()
{
Assert.ThrowsAny<ArgumentException>(() => new ServiceBus());
}
}
}