Apr 6, 2010 at 3:49 PM
Edited Apr 6, 2010 at 3:51 PM
Thanks for bearing with me I must not be explaining things very well. Maybe some code will help. Here is the test I'm having problems with:
public void LoadSomeXapClassTest()
var xapLoader = new XapLoader();
xapLoader.Load_Completed += (sender, result) =>
EnqueueCallback(() => xapLoader.LoadAsync(new Uri("SomeXap.xap", UriKind.RelativeOrAbsolute), typeof(SomeXapClass)));
Basically the XapLoader class is a wrapper around MEF which pulls in an external XAP with a DeploymentCatalog. After downloading and composing, it returns an instance of SomeXapClass which was exported. I know my wrapper class works. The only reason I'm
having a problem is my test project could not resolve SomeXap.xap (my fault). But instead of throwing an exception apparently the default behavior of MEF seems to just hang forever, waiting for a callback. That shouldn't matter to me because I decorated this
test with a timeout of 5 seconds. If I run this test through Visual Studio (which launches a Silverlight plugin in the browser) the timeout hits in 5 seconds and the test fails. However, if I run the test through StatLight I get the "Starting Test Run"
message at which point StatLight hangs for 5 minutes then exits.
You can see the same behavior with this test as well:
public void TimeoutTest()