Skip to content

Commit

Permalink
Merge branch 'release-2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasohlund committed Feb 6, 2015
2 parents a890428 + 0d51580 commit 045b6af
Show file tree
Hide file tree
Showing 176 changed files with 3,312 additions and 853 deletions.
2 changes: 1 addition & 1 deletion GitVersionConfig.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assemblyVersioningScheme: Major
assembly-versioning-scheme: Major
2 changes: 1 addition & 1 deletion packaging/nuget/NServiceBus.RabbitMQ.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<tags>nservicebus servicebus msmq cqrs publish subscribe</tags>
<dependencies>
<dependency id="NServiceBus" version="[5.0.0, 6.0.0)" />
<dependency id="RabbitMQ.Client" version="[3.3.5]" />
<dependency id="RabbitMQ.Client" version="[3.4.3]" />
</dependencies>
</metadata>
<files>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ namespace NServiceBus.AcceptanceTests.Audit
using AcceptanceTesting;
using NUnit.Framework;

public class When_using_auditing_as_a_feature : NServiceBusAcceptanceTest
public class When_auditing : NServiceBusAcceptanceTest
{
[Test]
public void Message_should_not_be_forwarded_to_auditQueue_when_auditing_is_disabled()
public void Should_not_be_forwarded_to_auditQueue_when_auditing_is_disabled()
{
var context = new Context();
Scenario.Define(context)
Expand All @@ -22,7 +22,7 @@ public void Message_should_not_be_forwarded_to_auditQueue_when_auditing_is_disab
}

[Test]
public void Message_should_be_forwarded_to_auditQueue_when_auditing_is_enabled()
public void Should_be_forwarded_to_auditQueue_when_auditing_is_enabled()
{
var context = new Context();
Scenario.Define(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

public class When_TimeToBeReceived_has_expired : NServiceBusAcceptanceTest
{
[Test, Ignore("The TTL will only be started at the moment the timeoutmanager sends the message back, still giving the test a second to receive it")]
[Test]
public void Message_should_not_be_received()
{
var context = new Context();
Scenario.Define(context)
.WithEndpoint<Endpoint>(b => b.Given((bus, c) => bus.Defer(TimeSpan.FromSeconds(5), new MyMessage())))
.WithEndpoint<Endpoint>(b => b.Given((bus, c) => bus.SendLocal(new MyMessage())))
.Run(TimeSpan.FromSeconds(10));
Assert.IsFalse(context.WasCalled);
}
Expand Down Expand Up @@ -41,7 +41,7 @@ public void Handle(MyMessage message)
}

[Serializable]
[TimeToBeReceived("00:00:01")]
[TimeToBeReceived("00:00:00")]
public class MyMessage : IMessage
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,15 @@
using System;
using NServiceBus.AcceptanceTesting;
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NServiceBus.Config;
using NServiceBus.Features;
using NServiceBus.UnitOfWork;
using NUnit.Framework;

public class When_handling_current_message_later : NServiceBusAcceptanceTest
{
[Test]
public void Should_commit_unit_of_work()
{
var context = new Context();

Scenario.Define(context)
.WithEndpoint<MyEndpoint>(b => b.Given(bus => bus.SendLocal(new SomeMessage())))
.Done(c => c.Done)
.Run(TimeSpan.FromSeconds(10));

Assert.True(context.UoWCommited);
}

[Test]
public void Should_not_execute_subsequent_handlers()
public void Should_commit_unit_of_work_and_execute_subsequent_handlers()
{
var context = new Context();

Expand All @@ -31,16 +20,15 @@ public void Should_not_execute_subsequent_handlers()
.Done(c => c.Done)
.Run();

Assert.True(context.UoWCommited);
Assert.That(context.FirstHandlerInvocationCount, Is.EqualTo(2));
Assert.That(context.SecondHandlerInvocationCount, Is.EqualTo(1));
}

public class Context : ScenarioContext
{
public bool Done { get; set; }

public int FirstHandlerInvocationCount { get; set; }

public int SecondHandlerInvocationCount { get; set; }
public bool UoWCommited { get; set; }
}
Expand All @@ -49,7 +37,16 @@ public class MyEndpoint : EndpointConfigurationBuilder
{
public MyEndpoint()
{
EndpointSetup<DefaultServer>(b => b.RegisterComponents(r => r.ConfigureComponent<CheckUnitOfWorkOutcome>(DependencyLifecycle.InstancePerCall)));
EndpointSetup<DefaultServer>(b =>
{
b.RegisterComponents(r => r.ConfigureComponent<CheckUnitOfWorkOutcome>(DependencyLifecycle.InstancePerCall));
b.DisableFeature<TimeoutManager>();
b.DisableFeature<SecondLevelRetries>();
})
.WithConfig<TransportConfig>(c =>
{
c.MaxRetries = 0;
});
}

class EnsureOrdering : ISpecifyMessageHandlerOrdering
Expand All @@ -66,7 +63,6 @@ class CheckUnitOfWorkOutcome : IManageUnitsOfWork

public void Begin()
{

}

public void End(Exception ex = null)
Expand Down Expand Up @@ -104,7 +100,6 @@ public void Handle(SomeMessage message)
[Serializable]
public class SomeMessage : IMessage { }


}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using NServiceBus.AcceptanceTests.EndpointTemplates;
using NUnit.Framework;

[Explicit]
public class When_incoming_headers_should_be_shared : NServiceBusAcceptanceTest
{
[Test]
Expand Down Expand Up @@ -61,8 +60,8 @@ class SecondHandler : IHandleMessages<Message>
public void Handle(Message message)
{
var header = Bus.GetMessageHeader(message, "Key");
Context.GotMessage = true;
Context.SecondHandlerCanReadHeaderSetByFirstHandler = header == "Value";
Context.GotMessage = true;
}
}
}
Expand Down
Loading

0 comments on commit 045b6af

Please sign in to comment.