diff --git a/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs b/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs
index e3ac5fcaa3..256f3111a3 100644
--- a/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs
+++ b/src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs
@@ -186,6 +186,11 @@ internal void RaiseTestRunMessage(TestRunMessageEventArgs args)
this.SafeInvokeAsync(() => this.TestRunMessage, args, 0, "InternalTestLoggerEvents.SendTestRunMessage");
}
+ internal void WaitForEventCompletion()
+ {
+ this.loggerEventQueue.Flush();
+ }
+
///
/// Raises a test result event to the enabled loggers.
///
diff --git a/src/Microsoft.TestPlatform.Common/Logging/TestLoggerManager.cs b/src/Microsoft.TestPlatform.Common/Logging/TestLoggerManager.cs
index d5f166b5f2..54e89df977 100644
--- a/src/Microsoft.TestPlatform.Common/Logging/TestLoggerManager.cs
+++ b/src/Microsoft.TestPlatform.Common/Logging/TestLoggerManager.cs
@@ -110,7 +110,7 @@ protected set
///
/// Gets the logger events.
///
- public TestLoggerEvents LoggerEvents
+ public InternalTestLoggerEvents LoggerEvents
{
get
{
diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectorSettings.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectorSettings.cs
index 277a86542f..df50008fc7 100644
--- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectorSettings.cs
+++ b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/DataCollectorSettings.cs
@@ -160,7 +160,15 @@ internal static DataCollectorSettings FromXml(XmlReader reader)
{
case "uri":
ValidateArg.NotNullOrEmpty(reader.Value, "uri");
- settings.Uri = new Uri(reader.Value);
+ try
+ {
+ settings.Uri = new Uri(reader.Value);
+ }
+ catch (UriFormatException)
+ {
+ throw new SettingsException(String.Format(CultureInfo.CurrentCulture, Resources.Resources.InvalidDataCollectorUriInSettings, reader.Value));
+ }
+
break;
case "assemblyQualifiedName":
diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.Designer.cs
index d729dffa26..faf434cec3 100644
--- a/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.Designer.cs
+++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.Designer.cs
@@ -312,7 +312,18 @@ internal static string InvalidSettingsXmlElement {
return ResourceManager.GetString("InvalidSettingsXmlElement", resourceCulture);
}
}
-
+
+ ///
+ /// Looks up a localized string similar to Invalid URI in data collector settings '{0}'..
+ ///
+ internal static string InvalidDataCollectorUriInSettings
+ {
+ get
+ {
+ return ResourceManager.GetString("InvalidDataCollectorUriInSettings", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Invalid data collector settings. Expected attribute '{0}' is missing. A typical data collector setting would look like <DataCollector uri="dataCollector://Samples/SampleCollector/1.0" assemblyQualifiedName="Samples.SampleCollector.SampleDataCollector, SampleCollectors, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1111111111111111" friendlyName="sampleCollector">..
///
diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.resx b/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.resx
index 35f3531d7b..2537968a90 100644
--- a/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.resx
+++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/Resources.resx
@@ -335,4 +335,7 @@
Failed to load msdia
+
+ Invalid URI in data collector settings '{0}'.
+
\ No newline at end of file
diff --git a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/Resources.cs.xlf
index e52ba4676e..d45b365ff9 100644
--- a/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/Resources.cs.xlf
+++ b/src/Microsoft.TestPlatform.ObjectModel/Resources/xlf/Resources.cs.xlf
@@ -597,6 +597,11 @@
Nepovedlo se načíst knihovnu msdia
+
+ Invalid URI in data collector settings '{0}'.
+ Invalid URI in data collector settings '{0}'.
+
+