Skip to content

Conversation

@PhenX
Copy link

@PhenX PhenX commented Sep 30, 2020

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 :)

@Deffiss
Copy link
Owner

Deffiss commented Oct 4, 2020

Hi @PhenX , awesome contribution, let us review and merge!

@Deffiss
Copy link
Owner

Deffiss commented Oct 4, 2020

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);
Copy link
Collaborator

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

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

Copy link
Author

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 :(

Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Copy link
Author

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.

Copy link
Owner

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.

Copy link
Owner

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

Copy link
Owner

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.

@jzabroski
Copy link
Contributor

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

@jzabroski
Copy link
Contributor

https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image I see in your yaml that you have ubuntu

@dgvives
Copy link
Contributor

dgvives commented Dec 28, 2020

@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.
This is the case when using MySQL image for Windows. I had to build my own images and upload to docker hub but it worked. It is worth the pain

@jzabroski
Copy link
Contributor

@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.
This is the case when using MySQL image for Windows. I had to build my own images and upload to docker hub but it worked. It is worth the pain

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.

@dgvives
Copy link
Contributor

dgvives commented Jan 6, 2021

@PhenX it seems downgrading package Oracle.ManagedDataAccess.Core to version 2.12.0-beta3 solves this issue
c8c068b
https://ci.appveyor.com/project/Deffiss/testenvironment-docker/builds/37139506

Also, using Oracle.DataAccess.Core may solve this, but I haven't found this package.
Same for setting TZ environment variable within the container.

Hope this brings some help for this fine contribution.

Edit:

Just dll from package is required.
2d39e9b
https://ci.appveyor.com/project/Deffiss/testenvironment-docker/builds/37140305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants