diff --git a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.5.2.6/Retries/When_sending_to_slr.cs b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.5.2.6/Retries/When_sending_to_slr.cs index 538c03475..861721e64 100644 --- a/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.5.2.6/Retries/When_sending_to_slr.cs +++ b/src/NServiceBus.SqlServer.AcceptanceTests/App_Packages/NSB.AcceptanceTests.5.2.6/Retries/When_sending_to_slr.cs @@ -36,6 +36,7 @@ public void Should_raise_FinishedMessageProcessing_event() Scenario.Define(context) .WithEndpoint(b => b.Given(bus => bus.SendLocal(new MessageToBeRetried()))) + .AllowExceptions() .Done(c => c.FinishedMessageProcessingCalledAfterFaultManagerInvoked) .Run(); diff --git a/src/NServiceBus.SqlServer.sln.DotSettings b/src/NServiceBus.SqlServer.sln.DotSettings index 2154b918d..0529d9fb6 100644 --- a/src/NServiceBus.SqlServer.sln.DotSettings +++ b/src/NServiceBus.SqlServer.sln.DotSettings @@ -154,7 +154,8 @@ CHOP_ALWAYS True True - <Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> + <?xml version="1.0" encoding="utf-16"?> +<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> <TypePattern DisplayName="COM interfaces or structs"> <TypePattern.Match> <Or> @@ -165,77 +166,67 @@ <HasAttribute Name="System.Runtime.InteropServices.ComImport" /> </Or> </And> - <HasAttribute Name="System.Runtime.InteropServices.StructLayoutAttribute" /> + <Kind Is="Struct" /> </Or> </TypePattern.Match> </TypePattern> - <TypePattern DisplayName="NUnit Test Fixtures" RemoveRegions="All"> <TypePattern.Match> <And> <Kind Is="Class" /> - <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="true" /> - <HasAttribute Name="NUnit.Framework.TestCaseFixtureAttribute" Inherited="true" /> + <HasAttribute Name="NUnit.Framework.TestFixtureAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.TestCaseFixtureAttribute" Inherited="True" /> </And> </TypePattern.Match> - <Entry DisplayName="Setup/Teardown Methods"> <Entry.Match> <And> <Kind Is="Method" /> <Or> - <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="true" /> - <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="true" /> - <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="true" /> - <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="true" /> + <HasAttribute Name="NUnit.Framework.SetUpAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.TearDownAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.FixtureSetUpAttribute" Inherited="True" /> + <HasAttribute Name="NUnit.Framework.FixtureTearDownAttribute" Inherited="True" /> </Or> </And> </Entry.Match> </Entry> - <Entry DisplayName="All other members" /> - - <Entry DisplayName="Test Methods" Priority="100"> + <Entry Priority="100" DisplayName="Test Methods"> <Entry.Match> <And> <Kind Is="Method" /> - <HasAttribute Name="NUnit.Framework.TestAttribute" Inherited="false" /> + <HasAttribute Name="NUnit.Framework.TestAttribute" /> </And> </Entry.Match> - <Entry.SortBy> <Name /> </Entry.SortBy> </Entry> </TypePattern> - <TypePattern DisplayName="Default Pattern"> - <Entry DisplayName="Public Delegates" Priority="100"> + <Entry Priority="100" DisplayName="Public Delegates"> <Entry.Match> <And> <Access Is="Public" /> <Kind Is="Delegate" /> </And> </Entry.Match> - <Entry.SortBy> <Name /> </Entry.SortBy> </Entry> - - <Entry DisplayName="Public Enums" Priority="100"> + <Entry Priority="100" DisplayName="Public Enums"> <Entry.Match> <And> <Access Is="Public" /> <Kind Is="Enum" /> </And> </Entry.Match> - <Entry.SortBy> <Name /> </Entry.SortBy> </Entry> - <Entry DisplayName="Static Fields and Constants"> <Entry.Match> <Or> @@ -246,17 +237,10 @@ </And> </Or> </Entry.Match> - <Entry.SortBy> - <Kind> - <Kind.Order> - <DeclarationKind>Constant</DeclarationKind> - <DeclarationKind>Field</DeclarationKind> - </Kind.Order> - </Kind> + <Kind Order="Constant Field" /> </Entry.SortBy> </Entry> - <Entry DisplayName="Fields"> <Entry.Match> <And> @@ -266,23 +250,19 @@ </Not> </And> </Entry.Match> - <Entry.SortBy> <Readonly /> <Name /> </Entry.SortBy> </Entry> - <Entry DisplayName="Constructors"> <Entry.Match> <Kind Is="Constructor" /> </Entry.Match> - <Entry.SortBy> - <Static/> + <Static /> </Entry.SortBy> </Entry> - <Entry DisplayName="Properties, Indexers"> <Entry.Match> <Or> @@ -291,30 +271,25 @@ </Or> </Entry.Match> </Entry> - - <Entry DisplayName="Interface Implementations" Priority="100"> + <Entry Priority="100" DisplayName="Interface Implementations"> <Entry.Match> <And> <Kind Is="Member" /> <ImplementsInterface /> </And> </Entry.Match> - <Entry.SortBy> - <ImplementsInterface Immediate="true" /> + <ImplementsInterface Immediate="True" /> </Entry.SortBy> </Entry> - <Entry DisplayName="All other members" /> - <Entry DisplayName="Nested Types"> <Entry.Match> <Kind Is="Type" /> </Entry.Match> </Entry> </TypePattern> -</Patterns> - +</Patterns> <?xml version="1.0" encoding="utf-8" ?> <!-- @@ -581,6 +556,7 @@ II.2.12 <HandlesEvent /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> True True + True True True True diff --git a/src/NServiceBus.SqlServer/AdaptiveExecutor.cs b/src/NServiceBus.SqlServer/AdaptiveExecutor.cs index 05dad6c46..9f667e392 100644 --- a/src/NServiceBus.SqlServer/AdaptiveExecutor.cs +++ b/src/NServiceBus.SqlServer/AdaptiveExecutor.cs @@ -67,17 +67,18 @@ void StartTask() var taskId = Guid.NewGuid(); var receiveTask = Task.Factory .StartNew(ReceiveLoop, state, token, TaskCreationOptions.LongRunning, TaskScheduler.Default) - .ContinueWith(t => + .ContinueWith((t, s) => { - t.Exception.Handle(ex => + if (t.IsFaulted) { - HandleException(ex); - circuitBreaker.Failure(ex); - return true; - }); - }, token, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default) - .ContinueWith((_, s) => - { + t.Exception.Handle(ex => + { + HandleException(ex); + circuitBreaker.Failure(ex); + return true; + }); + } + taskTracker.Forget((Guid)s); if (!taskTracker.ShouldStartAnotherTaskImmediately) diff --git a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj index d72f9daba..cbca3c838 100644 --- a/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj +++ b/src/NServiceBus.SqlServer/NServiceBus.SqlServer.csproj @@ -15,7 +15,7 @@ $(SolutionDir)NServiceBus.snk ..\ - 3ead7d6a + 6113ccb8 true @@ -134,15 +134,15 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - \ No newline at end of file + diff --git a/src/NServiceBus.SqlServer/packages.config b/src/NServiceBus.SqlServer/packages.config index acae12b57..8da7c6068 100644 --- a/src/NServiceBus.SqlServer/packages.config +++ b/src/NServiceBus.SqlServer/packages.config @@ -1,6 +1,6 @@  - +