aspire icon indicating copy to clipboard operation
aspire copied to clipboard

Extract Aspire.Hosting.Oracle.Tests

Open sebastienros opened this issue 1 year ago • 9 comments

Contributes to https://github.com/dotnet/aspire/issues/4294

Fixes #3161

Microsoft Reviewers: Open in CodeFlow

sebastienros avatar Jul 17 '24 09:07 sebastienros

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?

sebastienros avatar Jul 17 '24 12:07 sebastienros

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?

sebastienros avatar Jul 22 '24 08:07 sebastienros

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

radical avatar Jul 22 '24 09:07 radical

Looking at the log:

  1. 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

  2. But once the log says DATABASE IS READY TO USE, we start getting fail: 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?

radical avatar Jul 24 '24 19:07 radical

Does this work locally?

Yes. WSL2 for Docker containers, Windows for test runs. Will try with a Linux test host too.

sebastienros avatar Jul 25 '24 06:07 sebastienros

All tests passing when running them in wsl2.

sebastienros avatar Jul 25 '24 07:07 sebastienros

/azp run

sebastienros avatar Jul 30 '24 04:07 sebastienros

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 30 '24 04:07 azure-pipelines[bot]

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

eerhardt avatar Jul 31 '24 21:07 eerhardt

@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

sebastienros avatar Aug 13 '24 18:08 sebastienros

@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

#4943 (files)

It crashed because of --blame-hang-timeout 10m. There was "no activity" for 10 mins!

radical avatar Aug 13 '24 18:08 radical

/azp run

sebastienros avatar Aug 15 '24 19:08 sebastienros

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 15 '24 19:08 azure-pipelines[bot]

/azp run

sebastienros avatar Aug 16 '24 14:08 sebastienros

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 16 '24 14:08 azure-pipelines[bot]

Disabled tests on CI since they don't work, filed an issue to track with current progress.

sebastienros avatar Aug 20 '24 16:08 sebastienros