Skip to content

Commit

Permalink
Merge pull request #81 from Particular/release-2.1.0
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
HEskandari authored Dec 11, 2018
2 parents 3227bc2 + ec5541b commit 106e615
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 59 deletions.
6 changes: 3 additions & 3 deletions src/AcceptanceTests/AcceptanceTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<RootNamespace>NServiceBus.Persistence.ServiceFabric.AcceptanceTests</RootNamespace>
<SignAssembly>true</SignAssembly>
Expand All @@ -16,8 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="7.0.0" />
<PackageReference Include="NServiceBus.Azure.Transports.WindowsAzureServiceBus" Version="8.0.0" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="7.1.4" />
<PackageReference Include="NServiceBus.Azure.Transports.WindowsAzureServiceBus" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/AcceptanceTestsApplication/AcceptanceTestsApplication.sfproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets=";ValidateMSBuildFiles">
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" />
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" />
<PropertyGroup Label="Globals">
<ProjectGuid>6722aac7-f141-4492-85bb-be0c82ef7f98</ProjectGuid>
<ProjectVersion>2.0</ProjectVersion>
<MinToolsVersion>1.5</MinToolsVersion>
<SupportedMSBuildNuGetPackageVersion>1.6.5</SupportedMSBuildNuGetPackageVersion>
<SupportedMSBuildNuGetPackageVersion>1.6.7</SupportedMSBuildNuGetPackageVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
Expand Down Expand Up @@ -41,9 +41,9 @@
<Target Name="ReleaseAfterBuild" AfterTargets="AfterBuild">
<MSBuild Projects="$(ProjectPath)" Targets="Package" />
</Target>
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" />
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" />
<Target Name="ValidateMSBuildFiles">
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/AcceptanceTestsApplication/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.VisualStudio.Azure.Fabric.MSBuild" version="1.6.5" />
<package id="Microsoft.VisualStudio.Azure.Fabric.MSBuild" version="1.6.7" targetFramework="net40" />
</packages>
16 changes: 5 additions & 11 deletions src/ApiTests/ApiApproval.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using ApprovalTests;
using ApprovalTests.Reporters;
using System.Runtime.CompilerServices;
using NServiceBus.Persistence.ServiceFabric;
using NUnit.Framework;
using Particular.Approvals;
using PublicApiGenerator;

[TestFixture]
public class APIApprovals
{
[Test]
[MethodImpl(MethodImplOptions.NoInlining)]
[UseReporter(typeof(DiffReporter), typeof(AllFailingTestsClipboardReporter))]
public void ApproveServiceFabricPersistence()
{
var combine = Path.Combine(TestContext.CurrentContext.TestDirectory, "NServiceBus.Persistence.ServiceFabric.dll");
var assembly = Assembly.LoadFile(combine);
var publicApi = ApiGenerator.GeneratePublicApi(assembly);
Approvals.Verify(publicApi);
var publicApi = ApiGenerator.GeneratePublicApi(typeof(ServiceFabricPersistence).Assembly);
Approver.Verify(publicApi);
}
}
12 changes: 6 additions & 6 deletions src/ApiTests/ApiTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
Expand All @@ -10,11 +10,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ApprovalTests" Version="3.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
<PackageReference Include="PublicApiGenerator" Version="6.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.2" />
<PackageReference Include="Particular.Approvals" Version="0.2.0" />
<PackageReference Include="PublicApiGenerator" Version="8.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute(@"AcceptanceTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001007f16e21368ff041183fab592d9e8ed37e7be355e93323147a1d29983d6e591b04282e4da0c9e18bd901e112c0033925eb7d7872c2f1706655891c5c9d57297994f707d16ee9a8f40d978f064ee1ffc73c0db3f4712691b23bf596f75130f4ec978cf78757ec034625a5f27e6bb50c618931ea49f6f628fd74271c32959efb1c5")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute(@"Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001007f16e21368ff041183fab592d9e8ed37e7be355e93323147a1d29983d6e591b04282e4da0c9e18bd901e112c0033925eb7d7872c2f1706655891c5c9d57297994f707d16ee9a8f40d978f064ee1ffc73c0db3f4712691b23bf596f75130f4ec978cf78757ec034625a5f27e6bb50c618931ea49f6f628fd74271c32959efb1c5")]
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName=".NET Framework 4.5.2")]

namespace NServiceBus.Persistence.ServiceFabric
{

public interface IServiceFabricStorageSession
{
Microsoft.ServiceFabric.Data.IReliableStateManager StateManager { get; }
Expand Down Expand Up @@ -74,7 +72,6 @@ namespace NServiceBus.Persistence.ServiceFabric
}
namespace NServiceBus
{

public class static ServiceFabricOutboxSettingsExtensions
{
public static void SetFrequencyToRunDeduplicationDataCleanup(this NServiceBus.Outbox.OutboxSettings configuration, System.TimeSpan frequencyToRunDeduplicationDataCleanup) { }
Expand Down
12 changes: 2 additions & 10 deletions src/ServiceFabricPersistence/Outbox/OutboxStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ async Task CleanUpOldOutboxQueue(DateTimeOffset olderThan, CancellationToken can
using (var tx = reliableStateManager.CreateTransaction())
{
var currentIndex = 0;
var somethingToCommit = false;

var cleanConditionalValue = await CleanupOld.TryPeekAsync(tx, LockMode.Default, defaultOperationTimeout, cancellationToken).ConfigureAwait(false);

Expand All @@ -114,7 +113,6 @@ async Task CleanUpOldOutboxQueue(DateTimeOffset olderThan, CancellationToken can
{
await Outbox.TryRemoveAsync(tx, cleanupCommand.MessageId, defaultOperationTimeout, cancellationToken).ConfigureAwait(false);
await CleanupOld.TryDequeueAsync(tx, defaultOperationTimeout, cancellationToken).ConfigureAwait(false);
somethingToCommit = true;
}
else
{
Expand All @@ -125,10 +123,7 @@ async Task CleanUpOldOutboxQueue(DateTimeOffset olderThan, CancellationToken can
cleanConditionalValue = await CleanupOld.TryPeekAsync(tx, LockMode.Default, defaultOperationTimeout, cancellationToken).ConfigureAwait(false);
}

if (somethingToCommit)
{
await tx.CommitAsync().ConfigureAwait(false);
}
await tx.CommitAsync().ConfigureAwait(false);
}
}

Expand Down Expand Up @@ -172,10 +167,7 @@ async Task CleanUpNewOutboxQueue(DateTimeOffset olderThan, CancellationToken can
cleanConditionalValue = await Cleanup.TryDequeueAsync(tx, cancellationToken, defaultOperationTimeout).ConfigureAwait(false);
}

if (somethingToCommit)
{
await tx.CommitAsync().ConfigureAwait(false);
}
await tx.CommitAsync().ConfigureAwait(false);
}
}
}
Expand Down
11 changes: 3 additions & 8 deletions src/ServiceFabricPersistence/ServiceFabricPersistence.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric.Data" Version="[3.0.456, 4.0)" />
<PackageReference Include="Newtonsoft.Json" Version="[11.0.1, 12.0.0)" />
<PackageReference Include="Newtonsoft.Json" Version="[12.0.1, 13.0.0)" />
<PackageReference Include="NServiceBus" Version="[7.0.0, 8.0.0)" />
<PackageReference Include="Particular.CodeRules" Version="0.2.0" PrivateAssets="All" />
<PackageReference Include="Particular.Packaging" Version="0.1.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SourceLink.Create.GitHub" Version="2.6.0" PrivateAssets="All" />
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.6.0" />
<PackageReference Include="Particular.CodeRules" Version="0.2.1" PrivateAssets="All" />
<PackageReference Include="Particular.Packaging" Version="0.2.1" PrivateAssets="All" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/TestHarness/TestHarness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.2" />
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion src/TestRunner/CommunicationListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace TestRunner
using NServiceBus.Persistence.TestRunner;
using NUnit.Framework.Api;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal.Filters;

/// <summary>
/// The communication listener reflects the assembly containing TService for tests and loads them into an
Expand Down
8 changes: 8 additions & 0 deletions src/TestRunner/CompositeListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public void TestOutput(TestOutput output)
}
}

public void SendMessage(TestMessage message)
{
foreach(var testListener in testListeners)
{
testListener.SendMessage(message);
}
}

ITestListener[] testListeners;
}
}
4 changes: 4 additions & 0 deletions src/TestRunner/EventSourceTestListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ public void TestFinished(ITestResult result)
public void TestOutput(TestOutput output)
{
}

public void SendMessage(TestMessage message)
{
}
}
}
63 changes: 63 additions & 0 deletions src/TestRunner/FullNameFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
namespace TestRunner
{
using NUnit.Framework.Interfaces;

class FullNameFilter : ITestFilter
{
public FullNameFilter(string fullName)
{
this.fullName = fullName;
}

public TNode ToXml(bool recursive)
{
return TNode.FromXml($"<filter><test>{fullName}</test></filter>");
}

public TNode AddToXml(TNode parentNode, bool recursive)
{
parentNode.AddElement("test", fullName);
return parentNode;
}

public bool Pass(ITest test)
{
return Match(test) || MatchParent(test) || MatchDescendant(test);
}

public bool IsExplicitMatch(ITest test)
{
return Match(test) || MatchDescendant(test);
}

bool MatchParent(ITest test)
{
return test.Parent != null && (Match(test.Parent) || MatchParent(test.Parent));
}

bool Match(ITest test)
{
return test.FullName.Equals(fullName);
}

private bool MatchDescendant(ITest test)
{
if (test.Tests == null)
{
return false;
}

foreach (var child in test.Tests)
{
if (Match(child) || MatchDescendant(child))
{
return true;
}
}

return false;
}

string fullName;
}
}
4 changes: 4 additions & 0 deletions src/TestRunner/ResultListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@ public void TestFinished(ITestResult result)
public void TestOutput(TestOutput output)
{
}

public void SendMessage(TestMessage message)
{
}
}
}
4 changes: 4 additions & 0 deletions src/TestRunner/StatefulServiceProviderListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public void TestOutput(TestOutput output)
{
}

public void SendMessage(TestMessage message)
{
}

TService service;
}
}
2 changes: 1 addition & 1 deletion src/TestRunner/TestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ServiceFabric.Services.Remoting" Version="3.0.456" />
<PackageReference Include="NUnit" Version="3.8.1" />
<PackageReference Include="NUnit" Version="3.11.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net461</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<RootNamespace>NServiceBus.Persistence.ServiceFabric.Tests</RootNamespace>
<SignAssembly>true</SignAssembly>
Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.0.0" />
<PackageReference Include="NServiceBus" Version="7.1.4" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions src/TestsApplication/TestsApplication.sfproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets=";ValidateMSBuildFiles">
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" />
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" />
<PropertyGroup Label="Globals">
<ProjectGuid>6722aac7-f141-4492-85bb-be0c82ef7f99</ProjectGuid>
<ProjectVersion>2.0</ProjectVersion>
<MinToolsVersion>1.5</MinToolsVersion>
<SupportedMSBuildNuGetPackageVersion>1.6.5</SupportedMSBuildNuGetPackageVersion>
<SupportedMSBuildNuGetPackageVersion>1.6.7</SupportedMSBuildNuGetPackageVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
Expand Down Expand Up @@ -41,9 +41,9 @@
<Target Name="ReleaseAfterBuild" AfterTargets="AfterBuild">
<MSBuild Projects="$(ProjectPath)" Targets="Package" />
</Target>
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" />
<Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" />
<Target Name="ValidateMSBuildFiles">
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.props' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.5\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.props' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')" Text="Unable to find the '..\packages\Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.6.7\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets' file. Please restore the 'Microsoft.VisualStudio.Azure.Fabric.MSBuild' Nuget package." />
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/TestsApplication/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.VisualStudio.Azure.Fabric.MSBuild" version="1.6.5" />
<package id="Microsoft.VisualStudio.Azure.Fabric.MSBuild" version="1.6.7" targetFramework="net40" />
</packages>

0 comments on commit 106e615

Please sign in to comment.