Skip to content
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
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
assembly-versioning-scheme: Major
next-version: 2.0
next-version: 3.0
branches:
develop:
tag: alpha
Expand Down
8 changes: 1 addition & 7 deletions src/AcceptanceTests/EndpointTemplates/DefaultServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
using System.Threading.Tasks;
using AcceptanceTesting.Customization;
using AcceptanceTesting.Support;
using Configuration.AdvanceExtensibility;
using Features;
using Config.ConfigurationSource;

public class DefaultServer : IEndpointSetupTemplate
{
Expand All @@ -21,9 +19,7 @@ public DefaultServer(List<Type> typesToInclude)
this.typesToInclude = typesToInclude;
}

#pragma warning disable CS0618
public async Task<EndpointConfiguration> GetConfiguration(RunDescriptor runDescriptor, EndpointCustomizationConfiguration endpointConfiguration, IConfigurationSource configSource, Action<EndpointConfiguration> configurationBuilderCustomization)
#pragma warning restore CS0618
public async Task<EndpointConfiguration> GetConfiguration(RunDescriptor runDescriptor, EndpointCustomizationConfiguration endpointConfiguration, Action<EndpointConfiguration> configurationBuilderCustomization)
{
var types = endpointConfiguration.GetTypesScopedByTestClass();

Expand All @@ -32,7 +28,6 @@ public async Task<EndpointConfiguration> GetConfiguration(RunDescriptor runDescr
var configuration = new EndpointConfiguration(endpointConfiguration.EndpointName);

configuration.TypesToIncludeInScan(typesToInclude);
configuration.CustomConfigurationSource(configSource);
configuration.EnableInstallers();

configuration.DisableFeature<TimeoutManager>();
Expand All @@ -48,7 +43,6 @@ public async Task<EndpointConfiguration> GetConfiguration(RunDescriptor runDescr

await configuration.DefinePersistence(runDescriptor, endpointConfiguration).ConfigureAwait(false);

configuration.GetSettings().SetDefault("ScaleOut.UseSingleBrokerQueue", true);
configurationBuilderCustomization(configuration);

return configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace NServiceBus.AcceptanceTests
{
using Configuration.AdvanceExtensibility;
using Configuration.AdvancedExtensibility;

public static class EndpointConfigurationExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@ public static IEnumerable<Type> GetTypesScopedByTestClass(this EndpointCustomiza
{
var assemblies = new AssemblyScanner().GetScannableAssemblies();

var types = assemblies.Assemblies
//exclude all test types by default
.Where(a =>
{
var references = a.GetReferencedAssemblies();

return references.All(an => an.Name != "nunit.framework");
})
var assembliesToScan = assemblies.Assemblies
//exclude acceptance tests by default
.Where(a => a != Assembly.GetExecutingAssembly()).ToList();
var types = assembliesToScan
.SelectMany(a => a.GetTypes());

types = types.Union(GetNestedTypeRecursive(endpointConfiguration.BuilderType.DeclaringType, endpointConfiguration.BuilderType));
Expand Down Expand Up @@ -50,4 +46,4 @@ static IEnumerable<Type> GetNestedTypeRecursive(Type rootType, Type builderType)
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFrameworks>net462;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NServiceBus" Version="6.*" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="6.*" />
<PackageReference Include="NUnit" Version="3.*" />
<PackageReference Include="NServiceBus" Version="7.0.0-*" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="7.0.0-*" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RetrySuccessNotification\NServiceBus.Recoverability.RetrySucessNotification.csproj" />
</ItemGroup>
<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task Should_notify_with_sc_uniqueid_header()
.WithEndpoint<FakeServiceControl>()
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
})
.When(s =>
{
Expand All @@ -44,7 +44,7 @@ await Scenario.Define<Context>()
.WithEndpoint<FakeServiceControl>()
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
})
.When(s =>
{
Expand All @@ -64,7 +64,7 @@ public async Task Should_not_notify_when_trigger_header_is_missing()
.WithEndpoint<FakeServiceControl>()
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo(FakeServiceControl.NotificationsSatellite.NotificationAddress);
})
.When(s => s.SendLocal(new MessageToBeRetried())))
.Done(c =>
Expand Down
6 changes: 3 additions & 3 deletions src/AcceptanceTests/When_notifications_are_misconfigured.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task Should_not_activate_when_both_audits_and_notifications_are_sen
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.AuditProcessedMessagesTo("audit");
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo("audit");
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo("audit");
}))
.Done(c => c.EndpointsStarted)
.Run();
Expand All @@ -31,7 +31,7 @@ public async Task Should_not_activate_when_notification_address_is_whitespace()
var context = await Scenario.Define<Context>()
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo(" ");
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo(" ");
}))
.Done(c => c.EndpointsStarted)
.Run();
Expand All @@ -46,7 +46,7 @@ public async Task Should_not_activate_when_notification_address_is_null()
var context = await Scenario.Define<Context>()
.WithEndpoint<TestEndpoint>(b => b.CustomConfig(config =>
{
config.RetrySuccessNotifications().SendRetrySuccessNotificationsTo(null);
config.RetrySuccessNotification().SendRetrySuccessNotificationsTo(null);
}))
.Done(c => c.EndpointsStarted)
.Run();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace NServiceBus
{
using Configuration.AdvanceExtensibility;

using Configuration.AdvancedExtensibility;
/// <summary>
/// Configuration options for Retry Success Notifications
/// </summary>
Expand All @@ -10,7 +10,7 @@ public static class ConfigureRetrySuccessNotification
/// <summary>
/// Access settings to configure Retry Success Notifications
/// </summary>
public static RetrySuccessNotificationConfig RetrySuccessNotifications(this EndpointConfiguration config)
public static RetrySuccessNotificationConfig RetrySuccessNotification(this EndpointConfiguration config)
{
return new RetrySuccessNotificationConfig(config.GetSettings());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyName>NServiceBus.Recoverability.RetrySuccessNotification</AssemblyName>
<PackageId>NServiceBus.Recoverability.RetrySuccessNotification</PackageId>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand All @@ -24,9 +24,6 @@
<None Include="..\Directory.Build.targets" Link="Directory.Build.targets" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NServiceBus" Version="[6.0.0,7.0.0)" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration" />
<PackageReference Include="NServiceBus" Version="[7.0.0-*,8.0.0)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/RetrySuccessNotification/RetrySuccessNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/// <inheritdoc />
/// <summary>
/// Provides the retry success notification feature
/// Provides the retry success notification feature
/// </summary>
public class RetrySuccessNotification : Feature
{
Expand Down

This file was deleted.

46 changes: 0 additions & 46 deletions src/RetrySuccessNotification/Utils/RegistryReader.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/Tests/APIApprovals.Approve.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace NServiceBus
{
public class static ConfigureRetrySuccessNotification
{
public static NServiceBus.RetrySuccessNotificationConfig RetrySuccessNotifications(this NServiceBus.EndpointConfiguration config) { }
public static NServiceBus.RetrySuccessNotificationConfig RetrySuccessNotification(this NServiceBus.EndpointConfiguration config) { }
}
public class RetrySuccessNotificationConfig
{
Expand Down
8 changes: 4 additions & 4 deletions src/Tests/Config/RetrySuccessNotificationConfigTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Linq;
using NServiceBus;
using NServiceBus.Configuration.AdvanceExtensibility;
using NServiceBus.Configuration.AdvancedExtensibility;
using NServiceBus.Features;
using NUnit.Framework;

Expand All @@ -12,7 +12,7 @@ public void Notification_Address_Can_Be_Set()
{
var endpointConfiguration = new EndpointConfiguration("test");

var config = endpointConfiguration.RetrySuccessNotifications();
var config = endpointConfiguration.RetrySuccessNotification();

const string testAddress = "Test";

Expand All @@ -31,7 +31,7 @@ public void Trigger_Headers_Can_Be_Added()
{
var endpointConfiguration = new EndpointConfiguration("test");

var config = endpointConfiguration.RetrySuccessNotifications();
var config = endpointConfiguration.RetrySuccessNotification();

const string testHeader = "Test";

Expand All @@ -55,7 +55,7 @@ public void Copy_Message_Body_Setting_Can_Be_Set()
{
var endpointConfiguration = new EndpointConfiguration("test");

var config = endpointConfiguration.RetrySuccessNotifications();
var config = endpointConfiguration.RetrySuccessNotification();

config.CopyMessageBodyInNotification = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFrameworks>net462;netcoreapp2.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(SolutionDir)NServiceBus.snk</AssemblyOriginatorKeyFile>
<DebugType>full</DebugType>
<DebugSymbols>True</DebugSymbols>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.0.0-*" />
<PackageReference Include="NUnit" Version="3.7.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<Compile Remove="APIApprovals.cs" />
<Compile Remove="ApprovalTestConfig.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="ApprovalTests" Version="3.*" />
<PackageReference Include="NServiceBus" Version="6.*" />
<PackageReference Include="NUnit" Version="3.*" />
<PackageReference Include="PublicApiGenerator" Version="6.1.0-*" />
</ItemGroup>
<ItemGroup>
Expand Down