Skip to content

fix: properly implement IHealthCheckProvider.Check in MongoDB adapter #4964

fix: properly implement IHealthCheckProvider.Check in MongoDB adapter

fix: properly implement IHealthCheckProvider.Check in MongoDB adapter #4964

GitHub Actions / Test - rabbitmq x Information failed Jan 24, 2025 in 0s

32 passed, 1 failed and 0 skipped

Tests failed

❌ ./Tests/Stream/Client/TestResults/test-results.trx

33 tests were completed in 37s with 32 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.CreateSessionTests 2✅ 606ms
ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.HealthChecksTests 1❌ 122ms
ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.ResultsServiceTests 3✅ 284ms
ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.StreamWrapperTests 24✅ 34s
ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.TaskSubmissionTests 3✅ 419ms

✅ ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.CreateSessionTests

✅ NullDefaultTaskOptionShouldThrowException
✅ SessionShouldBeCreated

❌ ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.HealthChecksTests

❌ HealthCheckShouldSucceed
	  Expected: all items property Healthy equal to Healthy
	  But was:  < <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>, <{ "name": "object", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }>, <{ "name": "queue", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }> >
	  First non-matching item at index [0]:  <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>
	

✅ ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.ResultsServiceTests

✅ CreateResultsAndMetadataShouldSucceed
✅ CreateResultsDirectlyShouldSucceed
✅ DownloadNotExistingResultShouldSucceed

✅ ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.StreamWrapperTests

✅ EmptyPayload
✅ LargePayloads(10,1)
✅ LargePayloads(10,10)
✅ LargePayloads(10,2)
✅ LargePayloads(10,5)
✅ LargePayloads(2,1)
✅ LargePayloads(2,10)
✅ LargePayloads(2,2)
✅ LargePayloads(2,5)
✅ MultipleDataDependencies(1)
✅ MultipleDataDependencies(20)
✅ MultipleDataDependencies(5)
✅ MultipleTasks(100,Compute)
✅ MultipleTasks(100,Transfer)
✅ MultipleTasks(4,Compute)
✅ MultipleTasks(4,Transfer)
✅ MultipleTasks(5,Compute)
✅ MultipleTasks(5,Transfer)
✅ PriorityShouldHaveAnEffect(10)
✅ PriorityShouldHaveAnEffect(50)
✅ Square(2)
✅ Square(4)
✅ TaskError()
✅ TaskFailed

✅ ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.TaskSubmissionTests

✅ CreatedByShouldBeFilled
✅ SubmitTasksBeforePayloadShouldSucceed
✅ SubmitTasksShouldSucceed

Annotations

Check failure on line 70 in Tests/Stream/Client/HealthChecksTests.cs

See this annotation in the file changed.

@github-actions github-actions / Test - rabbitmq x Information

ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.HealthChecksTests ► HealthCheckShouldSucceed

Failed test found in:
  ./Tests/Stream/Client/TestResults/test-results.trx
Error:
    Expected: all items property Healthy equal to Healthy
    But was:  < <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>, <{ "name": "object", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }>, <{ "name": "queue", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }> >
    First non-matching item at index [0]:  <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>
  
Raw output
  Expected: all items property Healthy equal to Healthy
  But was:  < <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>, <{ "name": "object", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }>, <{ "name": "queue", "healthy": "HEALTH_STATUS_ENUM_HEALTHY" }> >
  First non-matching item at index [0]:  <{ "name": "database", "message": "TaskTable is not initializedMongo Collection<TData> not initialized yet.\n", "healthy": "HEALTH_STATUS_ENUM_UNHEALTHY" }>

   at ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.HealthChecksTests.HealthCheckShouldSucceed() in /home/runner/work/ArmoniK.Core/ArmoniK.Core/Tests/Stream/Client/HealthChecksTests.cs:line 70
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
   at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)

1)    at ArmoniK.Extensions.Common.StreamWrapper.Tests.Client.HealthChecksTests.HealthCheckShouldSucceed() in /home/runner/work/ArmoniK.Core/ArmoniK.Core/Tests/Stream/Client/HealthChecksTests.cs:line 70