0

So I have the following screenshots when I checked in:

enter image description here

I was looking around the internet and they seem to have a problem with their test, so I took a look at mine:

enter image description here

There are no failed tests, except there is an error System.NullReferenceException..

Why does this partially succeed happen? I didn't touch this class (where it gets the error) I did made a test for it, so is this is what is causing it?

MilkTea027
  • 301
  • 1
  • 5
  • 24
  • It looks like you have a race condition. That's about all anyone's going to be able to tell you without seeing the test code and the code under test. – Daniel Mann Jul 03 '14 at 04:38
  • Basically I am testing a singleton class with Thread t = new Thread(Worker); t.Start() Since it's hard to test it being a multithreaded environment, I used reflection to access the private instance and set it to null again per TestMethod, but I guess it's bad tests, but it does make the tests pass – MilkTea027 Jul 03 '14 at 05:05
  • Yup, it does seem like a race condition, everything is ok now, thanks a bunch.. – MilkTea027 Jul 03 '14 at 05:25

0 Answers0