Alex (or anyone), does "Build Release Package" run successfully? I mean, no
failing tests?

If I read this correctly, I get 3324 failing tests, despite having no
failing tests when run in VS2010 (resharper runner):

[...]
     [exec]    Not fixed yet.
     [exec] 235) Ignored :
NHibernate.Test.UtilityTest.TypeNameParserFixture.Par
seUnmatchedBracket
     [exec]    Not a big problem because the next type request will throw
the ex
ception
     [exec]

BUILD FAILED - 0 non-fatal error(s), 6 warning(s)

External Program Failed:
C:\Users\oskar.berggren\Documents\Projects\nhibernate-c
ore\Tools\NUnit\nunit-console-x86.exe (return code was 3324)

Total time: 177.5 seconds.


The nunit results file show:
<test-results
name="C:\Users\oskar.berggren\Documents\Projects\nhibernate-core\build\NHibernate-4.1.0.CR1\bin\net-4.0\NHibernate.Test.dll"
total="5087" errors="3308" failures="11" not-run="232" inconclusive="0"
ignored="227" skipped="0" invalid="5" date="2016-11-21" time="09:57:10">

I'm not sure what the difference between errors and failures is, but
3308+11 plus the 5 invalid equals 3324 at least.


I do get a lot of these:
<test-case
name="NHibernate.Test.Cascade.OneToOneCascadeDelete.Fk.Composite.DeleteOneToOneOrphansTestByCode.DeleteOneToOneOrphansTest.TestOrphanedWhileManaged"
executed="True" result="Error" success="False" time="0.016" asserts="0">
                                    <failure>

<message><![CDATA[System.TypeLoadException : Inheritance security rules
violated while overriding member:
'Antlr.Runtime.RecognitionException.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. Security accessibility of
the overriding method must match the security accessibility of the method
being overriden.
TearDown : System.TypeLoadException : Inheritance security rules violated
while overriding member:
'Antlr.Runtime.RecognitionException.GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)'. Security accessibility of
the overriding method must match the security accessibility of the method
being overriden.]]></message>
                                      <stack-trace><![CDATA[at
NHibernate.Hql.Ast.ANTLR.ErrorCounter..ctor()
at NHibernate.Hql.Ast.ANTLR.HqlParser..ctor(ITokenStream input,
RecognizerSharedState state) in
C:\Users\oskar.berggren\Documents\Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\HqlParser.cs:line
90
at NHibernate.Hql.Ast.ANTLR.HqlParser..ctor(ITokenStream input) in
C:\Users\oskar.berggren\Documents\Projects\nhibernate-core\src\NHibernate\Hql\Ast\ANTLR\Generated\HqlParser.cs:line
177


Antlr.Runtime.RecognitionException.GetObjectData does lack the
SecurityCritical attribute. Hate it when different test runners give wildly
different results.


/Oskar

2016-11-20 23:22 GMT+00:00 Oskar Berggren <[email protected]>:

> I've adjusted a bunch of tests to use "using (ISession s =
> sessions.OpenSession())" and the problem went away. Still no idea why it
> suddenly appeared (the problematic tests have been around since forever).
>
> /Oskar
>
> 2016-11-20 21:57 GMT+00:00 Oskar Berggren <[email protected]>:
>
>> Thanks for checking. Running in Visual Studio or using the NUnit GUI
>> runner started from ShowBuildMenu did not seem to hang, so it's strange.
>> They complete in about 6 minutes, while "build release package" took about
>> 40 minutes, most of it in tests.
>>
>>
>> I've just found that there are multiple sql connections open, and the one
>> trying to do something is blocked waiting for a lock held by another. Both
>> (or all 10...) connections belong to the nunit-agent process.
>>
>> Consider:
>>
>>                       <test-case name="NHibernate.Test.Composit
>> eId.ClassWithCompositeIdFixture.Hql" executed="True" result="Error"
>> success="False" time="0.000" asserts="0">
>>                         <failure>
>>                           
>> <message><![CDATA[NHibernate.Exceptions.GenericADOException
>> : could not execute batch command.[SQL: SQL not available]
>>   ----> System.Data.SqlClient.SqlException : Violation of PRIMARY KEY
>> constraint 'PK__class_w___AC41A41DF0C23C51'. Cannot insert duplicate key
>> in object 'dbo.class_w_com_id'. The duplicate key value is (stringKey, 3,
>> Aug 16 2003 12:00AM).
>>
>> THEN:
>>
>>                     <test-case name="NHibernate.Test.Composit
>> eId.ClassWithCompositeIdFixture.TestSimpleCRUD" executed="True"
>> result="Error" success="False" time="409.776" asserts="0">
>>                         <failure>
>>                           
>> <message><![CDATA[NHibernate.Exceptions.GenericADOException
>> : could not execute batch command.[SQL: SQL not available]
>>   ----> System.Data.SqlClient.SqlException : Violation of PRIMARY KEY
>> constraint 'PK__class_w___AC41A41DF0C23C51'. Cannot insert duplicate key
>> in object 'dbo.class_w_com_id'. The duplicate key value is (stringKey, 3,
>> Aug 16 2003 12:00AM).
>>
>>
>> But the Hql() test case looks like:
>>
>>         [Test]
>>         public void Hql()
>>         {
>>             // insert the new objects
>>             ISession s = OpenSession();
>>             ITransaction t = s.BeginTransaction();
>>
>>             ClassWithCompositeId theClass = new ClassWithCompositeId(id);
>>             theClass.OneProperty = 5;
>>
>>             ClassWithCompositeId theSecondClass = new
>> ClassWithCompositeId(secondId);
>>             theSecondClass.OneProperty = 10;
>>
>>             s.Save(theClass);
>>             s.Save(theSecondClass);
>>
>>             // XXXXXXX
>>
>>             t.Commit();
>>             s.Close();
>>
>>             ISession s2 = OpenSession();
>>
>>             IQuery hql = s2.CreateQuery("from ClassWithCompositeId as
>> cwid where cwid.Id.KeyString = :keyString");
>>
>>             hql.SetString("keyString", id.KeyString);
>>
>>             IList results = hql.List();
>>
>>             Assert.AreEqual(1, results.Count);
>>
>>             s2.Close();
>>         }
>>
>>
>> So if there is a failure it may exit without closing transactions and
>> session. Keeping the transaction open could certainly block the next test
>> case. But of course, the base TestClass is supposed to detected and close
>> any forgotten sessions, so it's still weird.
>>
>>
>> However, if I insert the following two lines at XXXXX above, I can get
>> the same hack when running the tests in VS:
>>     s.Flush();
>>     throw new Exception("BUH!");
>>
>>
>> Was just about to post this when I found a cuprit. This will run and hang
>> before the base TestCase class gets around to closing left-over sessions:
>>
>> ClassWithCompositeIdFixture.OnTearDown()
>>         {
>>             using (ISession s = sessions.OpenSession())
>>             {
>>                 s.Delete("from ClassWithCompositeId");
>>                 s.Flush();
>>             }
>>         }
>>
>>
>>
>> Still don't know why it's suddenly noticeable now. This isn't the only
>> test case that suffers from this it appears, yet it's not a problem for the
>> build server apparently. Just luck?
>>
>> /Oskar
>>
>> 2016-11-20 21:18 GMT+00:00 Alexander Zaytsev <[email protected]>:
>>
>>> No
>>> On Mon, 21 Nov 2016 at 9:15 AM, Oskar Berggren <[email protected]>
>>> wrote:
>>>
>>>> Is ShowBuildMenu -> Build release package hanging for anyone else?
>>>>
>>>> /Oskar
>>>>
>>>> --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhibernate-development" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "nhibernate-development" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to