Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Milvus.Client.Tests/DataTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ public async Task Timestamp_conversion()
{
DateTime before = DateTime.UtcNow;

await Task.Delay(200);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'm a bit confused about this test.

await Task.Delay(1100);

MutationResult mutationResult = await InsertDataAsync(3, 4);

DateTime insertion = MilvusTimestampUtils.ToDateTime(mutationResult.Timestamp);

await Task.Delay(200);
await Task.Delay(1100);

DateTime after = DateTime.UtcNow;

Expand Down
18 changes: 17 additions & 1 deletion Milvus.Client.Tests/MilvusFixture.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Docker.DotNet.Models;
using DotNet.Testcontainers.Builders;
using Testcontainers.Milvus;
using Xunit;

Expand All @@ -12,8 +14,22 @@ public sealed class MilvusFixture : IAsyncLifetime

private readonly MilvusContainer _container = new MilvusBuilder()
.WithImage(Environment.GetEnvironmentVariable("MILVUS_IMAGE") ?? DefaultMilvusImage)
.WithEnvironment("DEPLOY_MODE", "STANDALONE")
.WithEnvironment("QUOTA_AND_LIMITS_FLUSH_RATE_COLLECTION_MAX", "-1")
// Remove once https://github.com/testcontainers/testcontainers-dotnet/pull/1569 is available.
.WithEnvironment("DEPLOY_MODE", "STANDALONE")
// Remove once https://github.com/testcontainers/testcontainers-dotnet/pull/1585 is available.
.WithWaitStrategy(Wait.ForUnixContainer().UntilContainerIsHealthy())
.WithCreateParameterModifier(parameterModifier =>
{
parameterModifier.Healthcheck = new HealthcheckConfig
{
Test = ["CMD-SHELL", $"curl -f http://localhost:{MilvusBuilder.MilvusManagementPort}/healthz"],
Interval = TimeSpan.FromSeconds(30),
Timeout = TimeSpan.FromSeconds(20),
StartPeriod = 90 * 1_000_000_000L,
Retries = 3,
};
})
.Build();

public string Host => _container.Hostname;
Expand Down