public void InitializeTest() { // workaround for having a half-started repository if (RepositoryInstance.Started()) { RepositoryInstance.Shutdown(); } SnTrace.Test.Enabled = true; if (_testMethodOperation != null) { SnTrace.Test.Write("The operation was forced to close."); _testMethodOperation.Successful = false; _testMethodOperation.Dispose(); } _testMethodOperation = SnTrace.Test.StartOperation("TESTMETHOD: " + TestContext.TestName); }
public void _FinishTest(TestContext testContext) { if (_snTraceOperation != null) { _snTraceOperation.Successful = true; _snTraceOperation.Dispose(); } SnTrace.Flush(); }
public void Dispose() { DataProvider.Current.ReleaseTreeLock(_lockIds); if (this.logOp != null) { logOp.Successful = true; logOp.Dispose(); } }
public void Dispose() { //TODO: find a better design instead of calling an asynchronous method // synchronously inside a Dispose method. DataStore.ReleaseTreeLockAsync(_lockIds, CancellationToken.None).GetAwaiter().GetResult(); if (_logOp != null) { _logOp.Successful = true; _logOp.Dispose(); } }