Skip to content
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

Oracle Provider Implementation DONE #68

Open
wants to merge 146 commits into
base: master
Choose a base branch
from

Conversation

LGouellec
Copy link

No description provided.

Mimetis and others added 30 commits August 8, 2017 17:21
Editing Dotmim.Sync namespaces and removing .Core
…me('%Y%m%d%H%M%f', 'now'), '.', '')"

More accurate and resolving some issues if 2 syncs are too fast (less than 1 sec)

Adding SQLite tests
…cured.

This row appeared to be updated for the asker instead of appearing as for insert.
Just check if timestamp of insert is after or before last asker timestamp
Adding SyncStage.EnsureDatabase, SyncStage.EnsureConfiguration and SyncStage.EnsureScopes
migrate to netstandard 2.0 final
Allow Computed column (default null on SQLite provider)
Better No Primary keys execption
Check MaxLength over 4000 if Unicode
Check Unsigned MySqlTypes
@gentledepp
Copy link
Contributor

Thank you very much for your contribution!
Before we pull this, could you spare some time to

  1. create some oracle integration test?
    you can use the chinook sample database because it exists for all databases (oracle, mssql, prostgre)

It would be great if we could strip our integrationtests and samples down to use the same database in the near future as I think this would greatly improve readability and overall clarity.

Is there any chance you could do that? :-)

@LGouellec
Copy link
Author

I am responsible for performing the Oracle integration test ASAP ;)

@Mimetis
Copy link
Owner

Mimetis commented Aug 27, 2018

Hello @LGouellec

Once again, thx a lot for your contribution, I really appreciate !
I've search an Oracle dev for so long time, it's amazing to see that the contribution comes from the community. thx !

For now, please don't work to hard on tests, since I'm working on a new way to implement the tests for each provider.

I will notify you when it will be available.

Can't wait to publish a new version of Dotmim.Sync with an Oracle provider !!

@LGouellec
Copy link
Author

Hello,

With pleasure, community is there for that :) !
To be honest, I had a need for Oracle database replication, and I saw your presentation at the latest Devoxx.

I also implemented the Bulk part on Oracle, but I have disabled it because the stored procedures are not as good as in SQL Server.

So I preferred to use the unitary part for now. I will try to do a little bit of unit testing on my part soon.

At your disposal for the rest of the events :)

@Mimetis
Copy link
Owner

Mimetis commented Sep 7, 2018

Hello @LGouellec

I spent a lot of time to implement a brand new test project, with a different approach.

You should look into it, it should be A LOT easier to implement the Oracle tests.

I wrote a Wiki on it. It's a work in progress, so let's continue the discussion here, and please let me know everything you did not understand, and I will update the wiki.

Unit tests project: How it works

Sebastien

@gentledepp
Copy link
Contributor

Wow - this looks cool!
But as I am not so much a poweruser of XUnit, so please clarify this for me:

In your sample integration test Insert_One_Table_From_Server, you iterate over all syncconfigurations and call a base method to execute the tests.
Are all those syncconfiguration + TCP/HTTP/xxx variations displayed as separate tests in Visual Studio Test explorer? (To mee it seems not to be the case, which would not be ideal :-|)

@Mimetis
Copy link
Owner

Mimetis commented Sep 8, 2018

You're right, One test could failed potentially for some reasons, bad SyncConfiguration, error on HTTP proxy and so on... and you won't have a clear message on it.
To mitigate that, you can disable HTTP run in your provider fixture class.

For instance, the SqlServerFixture is running only on tcp with a sql client, on tcp with a mysql client and on http with sqlite (just an example) : Enable some properties on SqlServerFixture

public override bool EnableSqlServerClientOnTcp => true;
public override bool EnableSqlServerClientOnHttp => false;
public override bool EnableMySqlClientOnTcp => true;
public override bool EnableMySqlClientOnHttp => false;
public override bool EnableSqliteClientOnTcp => false;
public override bool EnableSqliteClientOnHttp => true;

Eventually my advice is to create your OracleFixture and enable only tcp on an Oracle client for example.

Something like that, I guess:

public class OracleFixture : ProviderFixture<CoreProvider>
{
    public override string DatabaseName => "OracleAdventureWorks";

    public override ProviderType ProviderType => ProviderType.Oracle;

    public override bool EnableOracleClientOnTcp => true;
    public override bool EnableOracleClientOnHttp => false;
    public override bool EnableSqlServerClientOnTcp => false;
    public override bool EnableSqlServerClientOnHttp => false;
    public override bool EnableMySqlClientOnTcp => false;
    public override bool EnableMySqlClientOnHttp => false;
    public override bool EnableSqliteClientOnTcp => false;
    public override bool EnableSqliteClientOnHttp => false;

    public OracleFixture()
    {
    }

    public override CoreProvider NewServerProvider(string connectionString)
    {
        return new OracleSyncProvider(connectionString);
    }
}

@gentledepp
Copy link
Contributor

Ok I see... this is not really optimal, but at least writing tests is way more efficient! 👍

@yuecels
Copy link

yuecels commented Oct 10, 2022

Hey @Mimetis, Is there any chance that this will be merged? 😅

@Mimetis
Copy link
Owner

Mimetis commented Oct 11, 2022

Hey @Mimetis, Is there any chance that this will be merged? 😅

No wayt, this PR is too old ;)
But if you want to participate feel free to contribute

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.

None yet

7 participants