This repository has been archived by the owner. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix parallel test running
- Geode 'Client' is a singleton, so needs to be a global resource in tests - XUnit uses a 'Collection' for this, so added NetCoreCollectionFixture and NetCoreCollection classes. Now Client is created before any tests run, and torn down when the last test completes.
- Loading branch information
Blake Bender
committed
Jun 10, 2021
1 parent
1de160e
commit e484ef50291d6e3faa66833d0b68039362b26591
Showing
8 changed files
with
172 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,22 @@ | ||
using System; | ||
using Apache.Geode.NetCore; | ||
using Xunit; | ||
|
||
public class NetCoreCollectionFixture : IDisposable | ||
{ | ||
public NetCoreCollectionFixture() | ||
{ | ||
client_ = new Client(); | ||
} | ||
public void Dispose() | ||
{ | ||
client_.Dispose(); | ||
} | ||
|
||
Client client_; | ||
} | ||
|
||
[CollectionDefinition("Geode .net Core Collection")] | ||
public class NetCoreCollection : ICollectionFixture<NetCoreCollectionFixture> | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -4,7 +4,8 @@ | ||
|
||
namespace GemfireDotNetTest | ||
{ | ||
public class ObjectLeakUnitTests | ||
[Collection("Geode .net Core Collection")] | ||
public class ObjectLeakUnitTests | ||
{ | ||
[Fact] | ||
public void TestLeakCacheFactory() | ||
Oops, something went wrong.