-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract Aspire.Hosting.Milvus.Tests project #4875
Conversation
@eerhardt, we need to import |
var milvusClient = host.Services.GetRequiredService<MilvusClient>(); | ||
|
||
string collectionName = "book"; | ||
var collection = await milvusClient.CreateCollectionAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need some resilience added to this test as it is currently failing. Looks like it tries hitting the database before it is ready.
|
||
[Fact] | ||
[RequiresDocker] | ||
public async Task VerifyMilvusDatabaseResource() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this test is fully necessary. It seems to duplicate the above test a lot. Can we just have 1 functional test like this? See #4862 for example.
|
||
[Fact] | ||
[RequiresDocker] | ||
public async Task WithDataVolumeShouldPersistStateBetweenUsages() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
[Fact] | ||
[RequiresDocker] | ||
public async Task PersistenceIsDisabledByDefault() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this test for every resource. I think this can be removed for Milvus.
tests/Aspire.Hosting.Milvus.Tests/Aspire.Hosting.Milvus.Tests.csproj
Outdated
Show resolved
Hide resolved
new[] { | ||
FieldSchema.Create<long>("book_id", isPrimaryKey:true), | ||
FieldSchema.Create<long>("word_count"), | ||
FieldSchema.CreateVarchar("book_name", 256), | ||
FieldSchema.CreateFloatVector("book_intro", 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new[] { | |
FieldSchema.Create<long>("book_id", isPrimaryKey:true), | |
FieldSchema.Create<long>("word_count"), | |
FieldSchema.CreateVarchar("book_name", 256), | |
FieldSchema.CreateFloatVector("book_intro", 2) | |
new[] | |
{ | |
FieldSchema.Create<long>("book_id", isPrimaryKey:true), | |
FieldSchema.Create<long>("word_count"), | |
FieldSchema.CreateVarchar("book_name", 256), | |
FieldSchema.CreateFloatVector("book_intro", 2) |
// Stops the container, or the Volume would still be in use | ||
await app.StopAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a finally
block like #4910 does. And same for the other StopAsync
in this test.
# Conflicts: # Aspire.sln
Co-authored-by: Ankit Jain <radical@gmail.com>
…csproj Co-authored-by: Ankit Jain <radical@gmail.com>
As soon as i come back to my desk i will apply suggested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for another contribution, @Alirexaa!
BTW - I pushed a change to remove Milvus from the EndToEnd tests, like we've done elsewhere.
It was my pleasure. |
Contributes to #3185
Contributes to #4294
Microsoft Reviewers: Open in CodeFlow