semsol / arc2

ARC RDF Classes for PHP
Other
332 stars 89 forks source link

Fixing failing tests (issue #125) #126

Closed cbinding closed 5 years ago

cbinding commented 5 years ago

Fix for failing tests as they were either making incorrect assertions or attempting to load data files that do not exist

k00ni commented 5 years ago

Hi @cbinding, big thank you!

Unfortunately, 1 test still fails:

https://travis-ci.org/semsol/arc2/jobs/484310143#L687

Any idea?

k00ni commented 5 years ago

I read the related issue #125.

You wrote:

Hi Konrad, thanks for following up - looking at one example https://github.com/semsol/arc2/blob/master/tests/db_adapter_depended/store/ARC2_StoreTest.php test 'testMultipleInsertQuerysInDifferentGraphs' which is currently failing - the assertion in the test itself appears to be incorrect. It inserts 1 triple into graph1 and 2 triples into graph2 but then asserts there should now be 1 triple in each graph - this test will always fail.

If that is the case, could you please remove the test?

cbinding commented 5 years ago

Hi, I believe this fixed test is now 'correctly' failing - i.e. it is correctly flagging up the insert problem as described in your issue #114 test code. The fix in pull request #123 should resolve this

k00ni commented 5 years ago

I merged your PRs. Lets see what Travis has to say after all tests ran. :)

k00ni commented 5 years ago

Something went wrong i guess. There are different errors in different environments now. For instance, MySQL 5.5 + PHP 7 + mysqli: https://travis-ci.org/semsol/arc2/jobs/484344747#L681. Fewer errors when using PDO: https://travis-ci.org/semsol/arc2/jobs/484344748#L673.

Any idea?

cbinding commented 5 years ago

The new PDO errors seem to be lower level SQL escaping issues connected with the content of the particular Turtle test file being loaded. However - the test file being loaded now is NOT the same file originally used, as the triple count is now different (was 106, now 1860). Sorry this was my error - I think the 'original' test file is actually located at https://raw.githubusercontent.com/semsol/arc2/master/tests/db_adapter_depended/sparql_1_1_tests/w3c-tests/move/manifest.ttl - I will amend the test code accordingly.

As for the mysqli errors,unfortunately I don't have an answer there at the moment.

cbinding commented 5 years ago

OK, interesting result after maling that change - tests using PDO now all pass; tests using mysqli all still fail. The errors seem to be in the sparql 1.1 compliance tests

k00ni commented 5 years ago

The current situation is very unfortunate and i tend to revert all the changes. Let's see, maybe later we can locate the problem.

Fixes some of the errors: #127

k00ni commented 4 years ago

Superseded by #137