Unit test problems

Unit test problems

Old forum URL: forums.lhotka.net/forums/t/7010.aspx


Dave.Erwin posted on Wednesday, May 27, 2009

There are problems with four of the unit tests in Csla 3.6.3 (they may have existed prior to this).

1. LinqBindingList_generated_by_orderby_added_items_still_in_proper_order does not pass.

2. LinqBindingList_generated_by_orderby_and_susequebt_thenbys_with_added_items_still_in_proper_order does not pass.

In trying to debug the tests it doesn't appear that the lambda is reevalauated after an item is added to random. I'm not up enough on 3.6 to know what should happen here or whether the tests are even valid.

3. BusyStatusTests.TestBusy seems to hang if it is run with all of the other tests. Passes if it is run individually.

4. CommandOverDataPortal does not pass. Needs the command name stored in a variable that is used in the assert instead of using cmd.Name otherwise result is "test data server server".

#1 and #2 are the big issues for me since I'm not sure if they are valid tests. I am in the process of attempting to back port 3.6.3 to .NET 2.0 so I'm relying on the unit tests pretty heavily to start with.

Anyone have any idea what to do with those tests besides comment them out? :-)

RockfordLhotka replied on Wednesday, May 27, 2009

I'm aware of issue 3, and I'd love a solution - just haven't found one...

I've brought 1 and 2 to Aaron's attention. This is an area of active work, so I'm surprised they are failing - it may be that something didn't get checked in.

I thought I'd fixed 4 a while ago - apparently not...

RockfordLhotka replied on Wednesday, May 27, 2009

The problem with 4 is that the data portal proxy wasn't being properly changed. The actual test code was correct.

Dave.Erwin replied on Thursday, May 28, 2009

I worked on issue 3 last night. I didn't find a solution but it only occurs when Csla.Test.Windows.TestReadWrite is included in the test suite. Haven't had time to find out why yet. Just kept pairing up groups of tests until I found the one that caused it to hang.

It may or may not be relevant but if the Silverlight.ApplicationContext tests and the BusyStatus tests are run together the TestNotBusy test hangs. Seems to only occur if the ServerShouldReceiveClientContextValue, ServerShouldReceiveGlobalContextValue, or GlobalContaxtOnClientShouldBeAffectedByChangeOnServer test is run with the BusyStatus tests. If these tests run in the entire suite TestNotBusy works fine so something is getting cleaned up/reset by one of the other tests.

Suspecting that it has something to do with UnitDriven.GetContext but ran out of time to look at it.

Dave

Copyright (c) Marimer LLC