-
Notifications
You must be signed in to change notification settings - Fork 29
Adds Oracle and Firebird containers with associated tests #41
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
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the AppVeyoir build timed out :(
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, very strange. Locally it works just fine.
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)