Skip to content

Revision of tests that fail #136

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

Merged
merged 77 commits into from
May 20, 2021
Merged

Revision of tests that fail #136

merged 77 commits into from
May 20, 2021

Conversation

alex-kulakov
Copy link
Contributor

The PR drops failed tests count for different storages. It was made by:

  • adding correct requirements to the tests (that makes tests not run against storages which have no support for certain features)
  • fixing test model or result checking algorithms to be able to run it across all the supported storages
  • fixing bugs that caused test fails

Full list of changes not connected with tests was added to changelog file for developing version. Note BREAKING CHANGE for Oracle: NULLs in ordering column now have the same place as in .Net (nulls first for ascending and nulls last for descending order).

Other changes:

  • Set of schemas and databases used by multi-schema multi-database tests is unified, instead of using literal constants used newly created WellKnownSchemas and WellKnownDatabases in Xtensive.Orm.Tests.Framework project.
  • minor tweaks and improvements

Not all tests that failed were fixed by far. Some of them need a lot of time to investigate so they were skipped

Failed tests count drops for

  • Firebird - from 89 down to 36
  • MySQL 5.5 and 5.6 - from 77 down to 30 and from 91 down to 41 respectively
  • Oracle - from 293 down to 103 (some tests fail because of random appearance of "ORA-08177: can't serialize access for this transaction" error which cause is not quite clear)
  • PostgreSQL - from 35-46 down to 5-6 depends on storage version
  • SQLite - from 61 down to 23

New codes have the same meaning so should be treated
as UniqueConstraintViolation, not as Unknown
- Added indexes to the model
- Changed filters for .Single() to actually return single value and not ruin tests
- Certain First/FirstOrDefault() and Single/SingleOrDefault() tests were improved
by adding new Asserts to them.
- Some tests were ignored for MySql because they don't suppose to run against it
- Split SelectStringContains() test into the one for case-sensitive and another
 for case-insensitive databases to prevent false fails
Tests were corrected due to the fact that some RDBMSs are unable to store
full .Net DateTime (Mysql does not store milliseconds at all)
- MySQL is excluded from required providers
- MainTest() was split to several tests per each tested query
Most RDBMSs have the same values for days of week as .Net, but not MySQL.
It has the same order by Int values assigned with days of week start with 1.
MySQL does not support for default values for string fields with length longer than 4000
MySQL does not like long strings to be indexed
Remove copies of some classes that already exist in the tests framework
like DomainConfigurationFactory or TestConfiguration and made
tests of extensions be based on single AutoBuildTest from
the tests framework. + minor changes
Types that work in all RDBMSs are in X entity, those that specific to certain
subset of RDBMSs are moved to separate Y and Z entities
150 items sequence will never be equal to 170 items sequence :)
Don't know whethere it should be for all the versions so left them as they were.
The v11 does not require shemas to be upper case for sure
- some tests cases were ignored due to Oracle particularities
- some broken test were fixed in order to fit Oracle limitations
The rest of storages have nulls order similar to .NET ordering algorithm
so now Oracle v11 and above have the same order as .NET
It also fixed some issues with these operations
Basically they fail because they were written without oracle in mind.
Some of them fail because of lack of feature check, others - because of bad design.
Native type for storing TimeSpans can be promoted to better precision
later on, so let the problem be uncovered
# Conflicts:
#	Extensions/Xtensive.Orm.Reprocessing.Tests/Tests/Other.cs
#	Extensions/Xtensive.Orm.Reprocessing.Tests/Tests/Reprocessing.cs
+ domain correct domain disposal in case of exception and use .ToArray(count)
@alex-kulakov alex-kulakov requested a review from AlexUstinov May 13, 2021 10:07
@alex-kulakov alex-kulakov changed the title Revision of tests that fails Revision of tests that fail May 17, 2021
@alex-kulakov alex-kulakov reopened this May 20, 2021
@alex-kulakov alex-kulakov merged commit bc90704 into 6.0 May 20, 2021
@alex-kulakov alex-kulakov deleted the 6.0-test-fixes branch May 20, 2021 15:01
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.

1 participant