Skip to content

SQLite.NET.Platform.MacOS (need help creating a PR) #196

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

Closed
tmarti opened this issue Jul 30, 2015 · 7 comments
Closed

SQLite.NET.Platform.MacOS (need help creating a PR) #196

tmarti opened this issue Jul 30, 2015 · 7 comments

Comments

@tmarti
Copy link

tmarti commented Jul 30, 2015

Hi,

I've modified the SQLite.Net.Platform.Win32 to create the SQLite.Net.Platform.MacOS (as suggested by Oystein in http://stackoverflow.com/questions/21197355/is-there-a-nuget-package-for-mac-sqlite-net-pcl-platform-sqlite-net-platform), and now it's working pretty well (little and straightforward changes, actually).

This necessity arised because of the wish to create integration tests for a Xamarin project that uses SQLite.Net and the impossibility to add the package SQLite.Net.Platform.Generic inside the NUnit test project (we develop under Mac) .

I would like to create a PR, but with null experience contributing to open-source repositories, I don't know if I should either fork the entire "oysteinkrog/SQLite.Net-PCL" repository or whatever.

Maybe an issue is not the proper way to request this kind of help, but: could somebody giveme a touch to to help create a PR?

Cheers.

@oysteinkrog
Copy link
Owner

It never hurts to ask:)
To create a PR you will indeed have to fork the repository.
Then you commit and push your changes to your fork (preferably to a specific branch).
Once you have done that you can then use github to create the PR.
I've been very busy lately, which has resulted in this project becoming a bit neglected.
I will try to find time soon to catch up on PR's etc.

@tmarti
Copy link
Author

tmarti commented Aug 1, 2015

Ok, code is already (almost) fully working, and it comes with sqlite3 (version 3081101) compiled for OS X in 32/64 bits versions.

Only two questions before doing the PR, to see if these two failing tests can be ignored.

AsyncTests.StressTest

This test fails with the following message...
* Expected: 500 *
* But was: 499 *

... meaning that 500 rows were expected to be inserted into DB but the CoutAsync only returns 499 rows.

Failing assertion is:

Assert.AreEqual(n, count);

If I add a 'Console.WriteLine(obj.Id);' right after await conn.InsertAsync(obj);, it can be seen at the 'output pane' that Id's ranging from 1 to 500 (inclusive) are auto generated, so I guess that 500 rows are inserted, actually.

So the question is: does this failing test have to be ignored? has this test failed in the past and been ignored?

BlobDelegateTest.CallsOnUnsupportedTypes

This test is failing in this assertion:

Assert.That(types, Has.Member(typeof (DateTimeOffset)));

This failing assertion means that the serialiser delegate is not being invoked when a property of type DateTimeOffset is found on a class that is to be persisted.

If instead of a DateTimeOffset property, a property whose type is a new class is added to the class to be persisted, the serialiser delegate is invoked for this new property and the test passes again.

So I suspect that SQLite.Net already supports DateTimeOffset properties and for this reason is not invoking the serialiser delegate.

So the question is: does it have to be accepted that this test is obsolete and for this reason it doesn't matter it is failing?

And that's all

I've not created the PR by the moment in await of response to these two issues.

@tmarti
Copy link
Author

tmarti commented Aug 1, 2015

Ok, finally created PR #199, despite of awaiting for response to the failing tests issue

Oh gods! Please forgive me! :)

@tmarti
Copy link
Author

tmarti commented Aug 15, 2015

Some feedback on the two failing tests cases?

Sadly, I'm unable to debug NUnit tests with Xamarin (d'ough!) from about 3 months ago (because Xamarin (or Mono) team has broken something in a recent update).

@tmarti
Copy link
Author

tmarti commented Aug 24, 2015

Ping?

@oysteinkrog
Copy link
Owner

Sorry for slow response:/
The failing tests are indeed either buggy or wrong, just ignore them.

@tmarti
Copy link
Author

tmarti commented Sep 4, 2015

Great! Happy to hear that

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

No branches or pull requests

2 participants