The failing tests on Postgres are DbVersionFixture.CollectionNoVersion
and DbVersionFixture.CollectionVersion. These are tests for using
timestampas version, and have actually failed before. Exploring the
test history in Teamcity reveals that they fail _almost_ every build
for Firebird, and occasionally for Postgres. It's a timing problem,
unrelated to the id generator changes.

>From test CollectionNoVersion:
        [...]
        DateTime guyTimestamp = guy.Timestamp;

        s = OpenSession();
        t = s.BeginTransaction();
        guy = s.Get<User>(guy.Id);
        perm = s.Get<Permission>(perm.Id);
        guy.Permissions.Add(perm);
        t.Commit();
        s.Close();

        Assert.That(NHibernateUtil.Timestamp.IsEqual(guyTimestamp,
guy.Timestamp), "owner version was incremented");

So we record the timestamp, then reload the object (and the timestamp)
from the database, and expect them to be the same. This works on MSSQL
since its dialect correctly claim that we can get timestamps from the
database, so both timestamps are from the database, and of the correct
precision.

However, it fails on at least Postgresql and Firebird, since their
dialects does _not_ claim "SupportsCurrentTimestampSelection". NH then
falls back to vm-timestamp, rounded by the dialect's
"TimestampResolutionInTicks" value, which is also not overridden by
these dialects, causing no rounding to occur in memory. However, when
stored in the db some precision is lost and thus the value doesn't
match when read back.


Patch on the way.

/Oskar


2011/12/3 Oskar Berggren <[email protected]>:
> I suspected that, about jira. Thanks!
>
> As for tests failing, I'm heading out for a party right now. If you
> prefer, feel free to revert, and I will have a look at the test
> failures tomorrow.
>
> /Oskar
>
>
> 2011/12/3 Julian Maughan <[email protected]>:
>> Hello Oskar
>>
>> I increased your privileges on Jira so you could close the issues yourself
>> :) Sorry I should have sent a follow-up email, but I got distracted.
>>
>> I have committed your latest ID generator changes, but there have been a few
>> test failures on Oracle, Firebird, and PostgreSQL. There seem to be
>> different causes. The weirdest is the PostgreSQL tests which are existing
>> tests that now fail - but only on PostgreSQL. I'm actively looking into the
>> problems, but any help is appreciated.
>>
>> Regards
>> Julian
>>
>>
>> On 2 December 2011 04:46, Oskar Berggren <[email protected]> wrote:
>>>
>>> Great! I don't know if I was just blind at first, or if I've suddenly
>>> gained some additional Jira-powers, but a few days after sending the
>>> mail I discovered that I had the ability to mark them resolved myself.
>>> :)
>>>
>>> /Oskar
>>>
>>>
>>> 2011/12/1 Richard Brown (gmail) <[email protected]>:
>>> > Hi Oskar,
>>> >
>>> > I've closed both of these off.  Thanks for your time looking into these.
>>> >
>>> > Cheers,
>>> >   Richard
>>> >
>>> >
>>> > -----Original Message----- From: Oskar Berggren
>>> > Sent: Sunday, November 27, 2011 9:06 PM
>>> > To: [email protected]
>>> > Subject: [nhibernate-development] Close some bugs
>>> >
>>> > I looked at a few bugs. Some modest results:
>>> >
>>> > NH-2395 Schema name inconsistency when working SQLite20
>>> > Recommend close as not an issue. User should use consistent spelling in
>>> > mapping.
>>> >
>>> > NH-2349 SetMaxResult works not properly with MySQL5Dialect
>>> > Duplicate of NH-2371 (which in turn was fixed in 3.0.0GA).
>>> >
>>> >
>>> > /Oskar
>>> >
>>
>>

Reply via email to