question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test fail when run using Visual Studio 15.7.5 and Resharper 2018.1.3 but not from build.cmd for net45

See original GitHub issue

When running test inside Visual Studio using Resharper I noticed that 13 tests are failing. However when I run the test from build.cmd everything passes. I just updated my Visual Studio and Resharper today and noticed this to be the case.

image

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jnm2commented, Oct 11, 2018

Got all tests passing in ReSharper! https://github.com/castleproject/Windsor/pull/440

1reaction
jnm2commented, Oct 10, 2018

Reproing on VS 15.8.7 and ReSharper 2018.2.3 which are current as of today.

In every case, the problem is that the WeakReference the test creates is alive when the test expects it not to be.

In particular, this trivial test (which follows the same pattern that the real tests depend on) fails when run via ReSharper:

		[Test]
		public void SimpleRepro()
		{
			var weak = new WeakReference(new object());
			GC.Collect();
			Assert.IsFalse(weak.IsAlive);
		}

Therefore, all the real tests have some hidden assumptions about the timeframe in which GC will certainly happen. There should probably be a test helper which actually ensures GC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All unit tests finished, but process still running
My reproduction scenario consists of running a single NUnit test ... run Visual Studio with the following command line: 'devenv /ReSharper.
Read more >
c# Resharper 'No Tests Found in Project' / 'Inconclusive
I was still unable to get this subset of unit tests to run. Then, in Visual Studio, I opened TEST -> Test Settings...
Read more >
Finding typos with ReSharper Command Line Tools ...
Doing all that stuff manually is error-prone and time-consuming and of course, I wanted to have the spellcheck up and running on the...
Read more >
ReSharper plugin template with tests | Yan's blog
A fully functional plugin with tests. The plugin is not yet installed into a Visual Studio, but we'll get there. Now, when your...
Read more >
Is Resharper worth it? : r/csharp
I'm a professional Software Engineer working in Visual Studio 2022 with Roslynator for my C# development. My company offers a paid license for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found