Skip to content

Commit 0770e76

Browse files
author
John Simons
committed
Merge branch 'release-1.1.0'
2 parents 6d9b855 + 3196e4a commit 0770e76

File tree

5 files changed

+64
-41
lines changed

5 files changed

+64
-41
lines changed

ripple.config

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,30 @@
3030
<Dependency Name="Microsoft.Owin.Host.HttpListener" Version="2.0.0" Mode="Fixed" />
3131
<Dependency Name="Microsoft.Owin.Hosting" Version="2.0.0" Mode="Fixed" />
3232
<Dependency Name="Microsoft.WindowsAzure.ConfigurationManager" Version="1.8.0.0" Mode="Fixed" />
33-
<Dependency Name="Nancy" Version="0.20.0" Mode="Fixed" />
34-
<Dependency Name="Nancy.Bootstrappers.Autofac" Version="0.20.0" Mode="Fixed" />
35-
<Dependency Name="Nancy.Owin" Version="0.20.0" Mode="Fixed" />
33+
<Dependency Name="Nancy" Version="0.22.2" Mode="Fixed" />
34+
<Dependency Name="Nancy.Bootstrappers.Autofac" Version="0.22.2" Mode="Fixed" />
35+
<Dependency Name="Nancy.Owin" Version="0.22.2" Mode="Fixed" />
3636
<Dependency Name="Newtonsoft.Json" Version="5.0.6" Mode="Fixed" />
3737
<Dependency Name="NLog" Version="2.0.1.2" Mode="Fixed" />
38-
<Dependency Name="NServiceBus" Version="4.4.0-Unstable0033" Mode="Float" />
39-
<Dependency Name="NServiceBus.AcceptanceTesting" Version="4.4.0-Unstable0033" Mode="Float" />
40-
<Dependency Name="NServiceBus.Autofac" Version="4.4.0-Unstable0033" Mode="Float" />
41-
<Dependency Name="NServiceBus.Azure.Transports.WindowsAzureServiceBus" Version="5.2.0" Mode="Float" />
42-
<Dependency Name="NServiceBus.Azure.Transports.WindowsAzureStorageQueues" Version="5.2.0" Mode="Float" />
43-
<Dependency Name="NServiceBus.Host" Version="4.4.0-Unstable0033" Mode="Float" />
44-
<Dependency Name="NServiceBus.Interfaces" Version="4.4.0-Unstable0033" Mode="Float" />
45-
<Dependency Name="NServiceBus.PowerShell" Version="4.3.0.0" Mode="Float" />
46-
<Dependency Name="NServiceBus.RabbitMQ" Version="1.1.0" Mode="Float" />
47-
<Dependency Name="NServiceBus.RavenDB" Version="0.2.0-Unstable24" Mode="Float" />
48-
<Dependency Name="NServiceBus.SqlServer" Version="1.2.0" Mode="Fixed" />
38+
<Dependency Name="NServiceBus" Version="4.6.1" Mode="Fixed" />
39+
<Dependency Name="NServiceBus.AcceptanceTesting" Version="4.6.1" Mode="Fixed" />
40+
<Dependency Name="NServiceBus.Autofac" Version="4.6.1" Mode="Fixed" />
41+
<Dependency Name="NServiceBus.Azure.Transports.WindowsAzureServiceBus" Version="5.3.0" Mode="Fixed" />
42+
<Dependency Name="NServiceBus.Azure.Transports.WindowsAzureStorageQueues" Version="5.3.0" Mode="Fixed" />
43+
<Dependency Name="NServiceBus.Host" Version="4.6.1" Mode="Fixed" />
44+
<Dependency Name="NServiceBus.Interfaces" Version="4.6.1" Mode="Fixed" />
45+
<Dependency Name="NServiceBus.PowerShell" Version="4.3.0.0" Mode="Fixed" />
46+
<Dependency Name="NServiceBus.RabbitMQ" Version="1.1.3" Mode="Fixed" />
47+
<Dependency Name="NServiceBus.RavenDB" Version="0.2.0" Mode="Fixed" />
48+
<Dependency Name="NServiceBus.SqlServer" Version="1.2.2" Mode="Fixed" />
4949
<Dependency Name="NUnit" Version="2.6.2" Mode="Fixed" />
5050
<Dependency Name="Owin" Version="1.0" Mode="Fixed" />
5151
<Dependency Name="Particular.CustomActions" Version="1.1.0" Mode="Float" />
5252
<Dependency Name="Particular.Licensing.Sources" Version="0.1.0.34" Mode="Float" />
5353
<Dependency Name="RabbitMQ.Client" Version="3.2.1" Mode="Fixed" />
54-
<Dependency Name="RavenDB.Client" Version="2.5.2865-Unstable" Mode="Fixed" Stability="Anything" />
55-
<Dependency Name="RavenDB.Database" Version="2.5.2865-Unstable" Mode="Fixed" Stability="Anything" />
56-
<Dependency Name="RavenDB.Embedded" Version="2.5.2865-Unstable" Mode="Fixed" Stability="Anything" />
54+
<Dependency Name="RavenDB.Client" Version="2.5.2879" Mode="Fixed" />
55+
<Dependency Name="RavenDB.Database" Version="2.5.2879" Mode="Fixed" />
56+
<Dependency Name="RavenDB.Embedded" Version="2.5.2879" Mode="Fixed" />
5757
<Dependency Name="SharpZipLib" Version="0.86.0" Mode="Fixed" />
5858
<Dependency Name="System.Spatial" Version="5.2.0.0" Mode="Fixed" />
5959
<Dependency Name="WindowsAzure.ServiceBus" Version="2.2.0.0" Mode="Fixed" />

src/ServiceControl.AcceptanceTests/Contexts/DefaultServer.cs

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using NServiceBus.Features;
1515
using NServiceBus.Hosting.Helpers;
1616
using NServiceBus.Logging.Loggers.NLogAdapter;
17-
using ServiceControl.MessageAuditing;
1817
using TransportIntegration;
1918

2019
public class DefaultServerWithoutAudit : DefaultServer
@@ -102,20 +101,32 @@ static void SetupLogging(EndpointConfiguration endpointConfiguration)
102101

103102
static IEnumerable<Type> GetTypesToUse(EndpointConfiguration endpointConfiguration)
104103
{
105-
var assemblies = new AssemblyScanner().GetScannableAssemblies().Assemblies
106-
.Where(a => a != typeof(ProcessedMessage).Assembly).ToList();
107-
108-
109-
var types = assemblies
110-
.SelectMany(a => a.GetTypes())
111-
.Where(
112-
t =>
113-
t.Assembly != Assembly.GetExecutingAssembly() || //exclude all test types by default
114-
t.DeclaringType == endpointConfiguration.BuilderType.DeclaringType ||
115-
//but include types on the test level
116-
t.DeclaringType == endpointConfiguration.BuilderType);
117-
//and the specific types for this endpoint
118-
return types;
104+
var assemblies = new AssemblyScanner().GetScannableAssemblies();
105+
106+
var types = assemblies.Assemblies
107+
//exclude all test types by default
108+
.Where(a => a != Assembly.GetExecutingAssembly())
109+
.Where(a => a.GetName().Name != "ServiceControl")
110+
.SelectMany(a => a.GetTypes());
111+
112+
types = types.Union(GetNestedTypeRecursive(endpointConfiguration.BuilderType.DeclaringType, endpointConfiguration.BuilderType));
113+
114+
types = types.Union(endpointConfiguration.TypesToInclude);
115+
116+
return types.Where(t => !endpointConfiguration.TypesToExclude.Contains(t)).ToList();
117+
}
118+
119+
static IEnumerable<Type> GetNestedTypeRecursive(Type rootType, Type builderType)
120+
{
121+
yield return rootType;
122+
123+
if (typeof(IEndpointConfigurationFactory).IsAssignableFrom(rootType) && rootType != builderType)
124+
yield break;
125+
126+
foreach (var nestedType in rootType.GetNestedTypes(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).SelectMany(t => GetNestedTypeRecursive(t, builderType)))
127+
{
128+
yield return nestedType;
129+
}
119130
}
120131
}
121132
}

src/ServiceControl.AcceptanceTests/When_a_message_has_been_successfully_processed.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,20 @@ class Foo: IWantToRunWhenBusStartsAndStops
250250

251251
public void Start()
252252
{
253+
//hack until we can fix the types filtering in default server
254+
if (string.IsNullOrEmpty(MyContext.MessageId))
255+
{
256+
return;
257+
}
258+
259+
if (Configure.EndpointName != "Particular.ServiceControl")
260+
{
261+
return;
262+
}
263+
253264
var transportMessage = new TransportMessage();
254-
transportMessage.Headers["NServiceBus.MessageId"] = MyContext.MessageId;
265+
transportMessage.Headers[Headers.MessageId] = MyContext.MessageId;
266+
transportMessage.Headers[Headers.ProcessingEndpoint] = Configure.EndpointName;
255267
SendMessages.Send(transportMessage, Address.Parse("audit"));
256268
}
257269

src/ServiceControl/Infrastructure/OWIN/OwinRunner.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ public void Start()
1616

1717
public void Stop()
1818
{
19-
if (webApp == null)
20-
{
21-
return;
22-
}
23-
24-
webApp.Dispose();
25-
Logger.InfoFormat("Api is now stopped");
19+
2620
}
2721

2822
static readonly ILog Logger = LogManager.GetLogger(typeof(OwinRunner));

src/ServiceControl/Infrastructure/TransportMessageExtensions.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ public static string ProcessingEndpointName(this TransportMessage message)
2020
return message.ReplyToAddress.Queue;
2121
}
2222

23-
throw new InvalidOperationException("No processing endpoint could be determined for message");
23+
string messageTypes;
24+
if (!message.Headers.TryGetValue(Headers.EnclosedMessageTypes, out messageTypes))
25+
{
26+
messageTypes = "Unknown";
27+
}
28+
29+
throw new InvalidOperationException(string.Format("No processing endpoint could be determined for message ({0})", messageTypes));
2430
}
2531

2632
public static string UniqueId(this TransportMessage message)

0 commit comments

Comments
 (0)