Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch fails to respond
ray440
#1 Posted : Saturday, December 3, 2011 10:27:35 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/3/2011(UTC)
Posts: 2

Some of my tests fail to respond when I change assertions (e.g. Assert.IsTrue(false))

Looking at the processing Queue shows this on the "Run Tests" line.

[14:16:29.4537-TestExecutionTask-33] ERROR (Internal): System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestRepository.#=qCUzbojIP475Ta93D1jObRJrJLWxH3_LYX1$zz1DSJ56iuN3BUgQtQAQ_7eYuClZY(IEnumerable`1 #=q1g7FSt7hXXax0vb_pS5H1Q==, IDictionary`2 #=qEvy89agmB2e_gRvNaIItiw==)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestRepository..ctor(IEnumerable`1 testsToRun)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.#=qGrRJ7gTK5_ax8EwKB8rrb4c2ZNSP_xrxnUqyktcDuPE=.#=q5PQXtKN44L40gg$2_ug00w==()
at #=qmdEAMK_c0wUkjl8QiR_0B$SqavkVGH8_WBLRdXnGACXX4ij_QGiQi6Yyi3LkqyId.#=qM5vw4cReHtB0oIZAADXisWrKqcIWrMteVT2lL5CSY$Y=(Action #=qQG$$IEqJNd7U57rti2oO0eMOr5L73KqDbcsBxL9FrLo=)
at nCrunch.TestExecution.Frameworks.NUnit.NUnitTestFramework.RunTests(TestOutput output, IList`1 testsToRun, MasterExecutionMapSet masterMapSet)
at nCrunch.TestExecution.TestRunnerThread.#=qh9mHFD74qNv_qxnwJeExOA==(IMasterExecutionMap[] #=qk1TQlxFS2PvZulTUk4olrnb6ZWeHHkBAUGvy2pOCQ04=, IList`1 #=q_93JaZI9Uj9vyZ1g2aaI8Q==)

Remco
#2 Posted : Sunday, December 4, 2011 3:29:45 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
It looks as though you have multiple tests that are identifying themselves to NCrunch using the same name. What are the characteristics of the tests that seem to cause this? Are they [TestCase] tests or parameterized fixtures? Does the processing queue show NCrunch trying to run the same test multiple times within the same test task?
ray440
#3 Posted : Sunday, December 4, 2011 10:31:06 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/3/2011(UTC)
Posts: 2

These seem to be two unrelated issues.

The exception does happen. All my tests and assemblies are unique...though after restarting a couple of times it no longer happens...

The other issue was some mishap/misunderstanding of what happens with catching exceptions in unit tests. For example, the following NUnit test written in f#:


[<Test>]
member this.``fails if name cannot be parsed``() =
try
let ne = make_NamedElement "very_badly_named_string"
Assert.IsTrue(false)
with
| e -> Assert.AreEqual(e.Message, "Bad name...")

This actually works now. But I got into a situation where the circle indicators were not correct.


Remco
#4 Posted : Sunday, December 4, 2011 11:15:50 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks - It sounds like some kind state related issue... If you have it happen again, would you be able to submit a bug report using the NCrunch menu? There have been a number of changes in the upcoming 1.36b that should fix issues like this, though it pays to be sure.

Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.049 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download