Extract Aspire.Hosting.Oracle.Tests
Contributes to https://github.com/dotnet/aspire/issues/4294
Fixes #3161
Microsoft Reviewers: Open in CodeFlow
Based on the attempts I made to get the tested feature to work I think we should remove the features behind the two tests that are skipped there (and kept to show others what does not work IMO).
Meaning:
WithDataBindMount()which had issues with some passwords (special chars) and takes 5 minutes to start. (not sure it even works after that)WithDbSetupBindMount()which doesn't read the files from the mount (test fails and docker logs shows the files are not taken into account). Could this be a limitation of the FREE version?
Aborting test run: test run timeout of 600000 milliseconds exceeded.
@radical tests are limited to 10 minutes apparently. Can we increase it for a test class?
Aborting test run: test run timeout of 600000 milliseconds exceeded.@radical tests are limited to 10 minutes apparently. Can we increase it for a test class?
You can have a per-project .runsettings file with a higher timeout. See https://github.com/radical/aspire/blob/751ed7161f20d4c8567c95b74f04ad8096d6d34d/tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj#L23
https://github.com/radical/aspire/blob/751ed7161f20d4c8567c95b74f04ad8096d6d34d/tests/Aspire.EndToEnd.Tests/.runsettings#L3-L6
Looking at the log:
-
While the image is downloading, and being started we get
fail: Microsoft.EntityFrameworkCore.Database.Command[0] 2024-07-24 13:19:30.327063 ThreadID:3 (ERROR) OracleDatabaseCreator.ExistsAsync() : OracleException.Number: 50000 -
But once the log says
DATABASE IS READY TO USE, we start gettingfail: Microsoft.EntityFrameworkCore.Database.Command[0] 2024-07-24 13:21:40.390172 ThreadID:44 (ERROR) OracleDatabaseCreator.ExistsAsync() : OracleException.Number: 50201
Looking at this (I hope that's the correct source), first we got REP-50000: A generic error occurred while running the job., and then REP-50201: The user role cannot be retrieved from the OID server..
The latter suggests that we have something missing in our setup? Does this work locally?
The other thing is FREEPDB1(3):Resize operation completed for file# 13, fname /opt/oracle/oradata/FREE/FREEPDB1/sysaux01.dbf, old size 337920K, new size 358400K - the file keeps getting resized, but that might just be a side-effect of all the failed requests?
Does this work locally?
Yes. WSL2 for Docker containers, Windows for test runs. Will try with a Linux test host too.
All tests passing when running them in wsl2.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
We should be able to remove these 2 lines now, right?
https://github.com/dotnet/aspire/blob/232e434c79acd2bd1221ad05a5d2dd5118018804/tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj#L21
https://github.com/dotnet/aspire/blob/232e434c79acd2bd1221ad05a5d2dd5118018804/tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj#L28
@radical do you see how what I did wrong with custom timeout on Helix
Test Run Aborted.
Total tests: Unknown
Passed: 13
Total time: 10.4133 Minutes
https://github.com/dotnet/aspire/pull/4943/files#diff-9d5d1aacb93015b5071c24986affe471f501b7de959aefe1d1708a37724f30eaR36
@radical do you see how what I did wrong with custom timeout on Helix
Test Run Aborted. Total tests: Unknown Passed: 13 Total time: 10.4133 Minutes
It crashed because of --blame-hang-timeout 10m. There was "no activity" for 10 mins!
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Disabled tests on CI since they don't work, filed an issue to track with current progress.