Skip to content

Commit 415440a

Browse files
committed
Fix buid and unit test
Signed-off-by: Victor Chang <[email protected]>
1 parent ae3e0d0 commit 415440a

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

src/InformaticsGateway/Logging/Log.500.ExportService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static partial class Log
3838
public static partial void FileReadyForExport(this ILogger logger, string file);
3939

4040
[LoggerMessage(EventId = 505, Level = LogLevel.Information, Message = "Export task completed with {failedCount} failures out of {fileCount}. Time to export: {durationMilliseconds}ms.")]
41-
public static partial void ExportCompleted(this ILogger logger, int failedCount, int fileCount, int durationMilliseconds);
41+
public static partial void ExportCompleted(this ILogger logger, int failedCount, int fileCount, double durationMilliseconds);
4242

4343
[LoggerMessage(EventId = 506, Level = LogLevel.Error, Message = "Error downloading payload. Waiting {timeSpan} before next retry. Retry attempt {retryCount}.")]
4444
public static partial void ErrorDownloadingPayloadWithRetry(this ILogger logger, Exception ex, TimeSpan timeSpan, int retryCount);

src/InformaticsGateway/Services/Connectors/PayloadNotificationService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
using Microsoft.Extensions.Hosting;
2424
using Microsoft.Extensions.Logging;
2525
using Microsoft.Extensions.Options;
26+
using Monai.Deploy.InformaticsGateway.Api;
2627
using Monai.Deploy.InformaticsGateway.Api.Rest;
2728
using Monai.Deploy.InformaticsGateway.Api.Storage;
2829
using Monai.Deploy.InformaticsGateway.Common;

src/InformaticsGateway/Test/Monai.Deploy.InformaticsGateway.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
<Target Name="CopyPluginsBuild" AfterTargets="Build">
7272
<ItemGroup>
73-
<PluginDlls Include="$(OutDir)Monai.Deploy.InformaticsGateway.Test.PlugIns.dll;$(OutDir)Monai.Deploy.InformaticsGateway.Test.dll" />
73+
<PluginDlls Include="$(OutDir)Monai.Deploy.InformaticsGateway.Test.PlugIns.dll;$(OutDir)Monai.Deploy.InformaticsGateway.Test.dll;$(OutDir)Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution.dll;" />
7474
</ItemGroup>
7575
<Copy SourceFiles="@(PluginDlls)" DestinationFolder="$(OutDir)\plug-ins\" SkipUnchangedFiles="true" />
7676
<Message Text="Files copied successfully to $(OutDir)\plug-ins\." Importance="high" />

src/InformaticsGateway/Test/Services/Common/InputDataPluginEngineFactoryTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Microsoft.Extensions.Logging;
2222
using Monai.Deploy.InformaticsGateway.Api.PlugIns;
2323
using Monai.Deploy.InformaticsGateway.Common;
24+
using Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution;
2425
using Monai.Deploy.InformaticsGateway.Services.Common;
2526
using Monai.Deploy.InformaticsGateway.SharedTest;
2627
using Monai.Deploy.InformaticsGateway.Test.PlugIns;
@@ -50,6 +51,7 @@ public void RegisteredPlugIns_WhenCalled_ReturnsListOfPlugIns()
5051
var result = factory.RegisteredPlugIns();
5152

5253
Assert.Collection(result,
54+
p => VerifyPlugIn(p, typeof(DicomReidentifier)),
5355
p => VerifyPlugIn(p, typeof(TestInputDataPlugInAddWorkflow)),
5456
p => VerifyPlugIn(p, typeof(TestInputDataPlugInResumeWorkflow)),
5557
p => VerifyPlugIn(p, typeof(TestInputDataPlugInModifyDicomFile)),
@@ -59,6 +61,7 @@ public void RegisteredPlugIns_WhenCalled_ReturnsListOfPlugIns()
5961
_logger.VerifyLogging($"{typeof(IInputDataPlugIn).Name} data plug-in found {typeof(TestInputDataPlugInResumeWorkflow).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(TestInputDataPlugInResumeWorkflow).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
6062
_logger.VerifyLogging($"{typeof(IInputDataPlugIn).Name} data plug-in found {typeof(TestInputDataPlugInModifyDicomFile).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(TestInputDataPlugInModifyDicomFile).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
6163
_logger.VerifyLogging($"{typeof(IInputDataPlugIn).Name} data plug-in found {typeof(TestInputDataPlugInVirtualAE).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(TestInputDataPlugInVirtualAE).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
64+
_logger.VerifyLogging($"{typeof(IInputDataPlugIn).Name} data plug-in found {typeof(DicomReidentifier).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(DicomReidentifier).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
6265
}
6366

6467
private void VerifyPlugIn(KeyValuePair<string, string> values, Type type)

src/InformaticsGateway/Test/Services/Common/OutputDataPluginEngineFactoryTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using Microsoft.Extensions.Logging;
2222
using Monai.Deploy.InformaticsGateway.Api.PlugIns;
2323
using Monai.Deploy.InformaticsGateway.Common;
24+
using Monai.Deploy.InformaticsGateway.PlugIns.RemoteAppExecution;
2425
using Monai.Deploy.InformaticsGateway.Services.Common;
2526
using Monai.Deploy.InformaticsGateway.SharedTest;
2627
using Monai.Deploy.InformaticsGateway.Test.PlugIns;
@@ -50,12 +51,14 @@ public void RegisteredPlugIns_WhenCalled_ReturnsListOfPlugIns()
5051
var result = factory.RegisteredPlugIns();
5152

5253
Assert.Collection(result,
54+
p => VerifyPlugIn(p, typeof(DicomDeidentifier)),
5355
p => VerifyPlugIn(p, typeof(TestOutputDataPlugInAddMessage)),
5456
p => VerifyPlugIn(p, typeof(TestOutputDataPlugInModifyDicomFile))
5557
);
5658

5759
_logger.VerifyLogging($"{typeof(IOutputDataPlugIn).Name} data plug-in found {typeof(TestOutputDataPlugInAddMessage).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(TestOutputDataPlugInAddMessage).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
5860
_logger.VerifyLogging($"{typeof(IOutputDataPlugIn).Name} data plug-in found {typeof(TestOutputDataPlugInModifyDicomFile).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(TestOutputDataPlugInModifyDicomFile).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
61+
_logger.VerifyLogging($"{typeof(IOutputDataPlugIn).Name} data plug-in found {typeof(DicomDeidentifier).GetCustomAttribute<PlugInNameAttribute>()?.Name}: {typeof(DicomDeidentifier).GetShortTypeAssemblyName()}.", LogLevel.Information, Times.Once());
5962
}
6063

6164
private void VerifyPlugIn(KeyValuePair<string, string> values, Type type)

0 commit comments

Comments
 (0)