Adds Oracle and Firebird containers with associated tests#41
Adds Oracle and Firebird containers with associated tests#41PhenX wants to merge 3 commits intoDeffiss:masterfrom
Conversation
|
Hi @PhenX , awesome contribution, let us review and merge! |
|
I've just noticed Oracle test is failed on AppVeyor, let's try to find out the reason. |
| using var command = new OracleCommand("SELECT * FROM V$VERSION", connection); | ||
|
|
||
| await connection.OpenAsync(cancellationToken); | ||
| await command.ExecuteNonQueryAsync(cancellationToken); |
There was a problem hiding this comment.
Tests are failing with error:
test-env-my-oracle check failed with exception ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
Probably you need to specify additional parameters to default connection string or configure IsRetryable property in the similar way as in https://github.com/Deffiss/testenvironment-docker/blob/master/src/TestEnvironment.Docker.Containers.MariaDB/MariaDBContainerWaiter.cs#L29
There was a problem hiding this comment.
True, this is how timezome might be set on connection level
https://stackoverflow.com/questions/53510011/asp-net-core-docker-container-using-oracle-managed-driver-core-throws-ora-00604
There was a problem hiding this comment.
Thanks, I tried to add the timezone in the env vars, let's see if that's enough
There was a problem hiding this comment.
It looks like the AppVeyoir build timed out :(
There was a problem hiding this comment.
There are still ORA-01882: timezone region not found errors in appveyor, I suspect there is no UTC timezone inside Docker image. I'll try to troubleshoot locally.
There was a problem hiding this comment.
Still no luck ... Maybe with a more "common" timezone like "Europe/Paris" ? I checked, UTC exists in the Oracle timezone table though.
There was a problem hiding this comment.
Yes, very strange. Locally it works just fine.
There was a problem hiding this comment.
I did some research and found that in HealthCheck project Oracle tests are skipped for some reasons on AppVeyor:
https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/test/FunctionalTests/HealthChecks.Oracle/OracleHealthCheckTests.cs
There was a problem hiding this comment.
My current feeling that in AppVeyor there is a discrepancy between timezones inside container and on builder machine, we need to find a way to identify timezone that exists in two places.
|
One thing to check and be mindful of with timezones is whether you're using a linux distribution that ships time zones and locales. Time zones in Alpine Linux require installing tzdata otherwise you just get UTC |
|
https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image I see in your yaml that you have ubuntu |
|
@PhenX , in case you haven't solved it yet. it might be the image being used by the CI/CD agent doesn't have time zones initialized. |
Thanks for your help, David! @dgvives We're hoping to use TestEnvironment.Docker in FluentMigrator repo to do large integration tests against all the various database drivers available in .NET Core. |
|
@PhenX it seems downgrading package Oracle.ManagedDataAccess.Core to version 2.12.0-beta3 solves this issue Also, using Oracle.DataAccess.Core may solve this, but I haven't found this package. Hope this brings some help for this fine contribution. Edit: Just dll from package is required. |
This project may be a good option for integration tests for the https://github.com/fluentmigrator/fluentmigrator so I started working a on new containers types, please tell me if everything is ok in my code :)