Skip to content

Commit

Permalink
Rename overly-long TestEnv property
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Aug 23, 2024
1 parent 3659f5d commit 6f53b1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LfMerge.Core.Tests/E2E/E2ETestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public async Task TestTeardown()
var outcome = TestContext.CurrentContext.Result.Outcome;
var success = outcome == ResultState.Success || outcome == ResultState.Ignored;
// Only delete temp folder if test passed, otherwise we'll want to leave it in place for post-test investigation
TestEnv.DeleteTempFolderDuringCleanup = success;
TestEnv.CleanUpTestData = success;
// On failure, also leave LexBox project(s) in place for post-test investigation, even though this might tend to clutter things up a little
if (success) {
foreach (var projId in ProjectIdsToDelete) {
Expand Down
4 changes: 2 additions & 2 deletions src/LfMerge.Core.Tests/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class TestEnvironment : IDisposable
private readonly bool _resetLfProjectsDuringCleanup;
private readonly bool _releaseSingletons;
protected bool _disposed;
public bool DeleteTempFolderDuringCleanup { get; set; } = true;
public bool CleanUpTestData { get; set; } = true;
public LfMergeSettings Settings;
private readonly MongoConnectionDouble _mongoConnection;
public ILogger Logger => MainClass.Logger;
Expand Down Expand Up @@ -123,7 +123,7 @@ protected virtual void Dispose(bool disposing)
MainClass.Container = null;
if (_resetLfProjectsDuringCleanup)
LanguageForgeProjectAccessor.Reset();
if (DeleteTempFolderDuringCleanup)
if (CleanUpTestData)
_languageForgeServerFolder?.Dispose();
Settings = null;
if (_releaseSingletons)
Expand Down

0 comments on commit 6f53b1a

Please sign in to comment.