Skip to content

Commit f55ef05

Browse files
committed
tests fixup?
Signed-off-by: Neil South <[email protected]>
1 parent 6b97ee8 commit f55ef05

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/Api/Storage/Payload.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public TimeSpan Elapsed
8686

8787
public int FilesFailedToUpload { get => Files.Count(p => p.IsUploadFailed); }
8888

89+
public Payload() { }
90+
8991
public Payload(string key, string correlationId, string? workflowInstanceId, string? taskId, DataOrigin dataTrigger, uint timeout)
9092
{
9193
Guard.Against.NullOrWhiteSpace(key, nameof(key));

src/InformaticsGateway/Repositories/MonaiServiceLocator.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public Dictionary<string, ServiceStatus> GetServiceStatus()
5757
if (TypeInterface is null)
5858
{
5959
var service = _serviceProvider.GetServices<IHostedService>()?.FirstOrDefault(i => i.GetType().Name == type.Name);
60-
return null;
61-
//return service as IMonaiService;
60+
return service as IMonaiService;
6261
}
6362
return (_serviceProvider.GetService(TypeInterface) as IMonaiService);
6463

tests/Integration.Test/Drivers/EfDataProvider.cs

100644100755
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ public void ClearAllData()
6262
DumpAndClear("SourceApplicationEntities", _dbContext.SourceApplicationEntities.ToList());
6363
DumpAndClear("MonaiApplicationEntities", _dbContext.MonaiApplicationEntities.ToList());
6464
DumpAndClear("VirtualApplicationEntities", _dbContext.VirtualApplicationEntities.ToList());
65-
DumpAndClear("Payloads", _dbContext.Payloads.ToList());
65+
try
66+
{
67+
DumpAndClear("Payloads", _dbContext.Payloads.ToList());
68+
}
69+
catch (Exception)
70+
{
71+
}
72+
6673
DumpAndClear("InferenceRequests", _dbContext.InferenceRequests.ToList());
6774
DumpAndClear("StorageMetadataWrapperEntities", _dbContext.StorageMetadataWrapperEntities.ToList());
6875
_dbContext.SaveChanges();

0 commit comments

Comments
 (0)