Skip to content

Commit

Permalink
Re #7218. Use a unique workspace name for this test.
Browse files Browse the repository at this point in the history
Although there's a setUp method that clears the ADS, I think it's possible
for the previous test to still be running and to pop its workspace back
in there, which could possibly be why this test occasionally fails.
  • Loading branch information
RussellTaylor committed Jun 4, 2013
1 parent c0442db commit 5f97f61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/DataHandling/test/MonitorLiveDataTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,19 @@ class MonitorLiveDataTest : public CxxTest::TestSuite
ConfigService::Instance().setString("testdatalistener.m_changeStatusAfter", "4");
ConfigService::Instance().setString("testdatalistener.m_newStatus", "4" /* ILiveListener::EndRun */);

boost::shared_ptr<MonitorLiveData> alg1 = makeAlgo("fake1", "", "Add", "Rename", "0.15");
boost::shared_ptr<MonitorLiveData> alg1 = makeAlgo("fake2", "", "Add", "Rename", "0.15");
// Run this algorithm until that chunk #
if (!runAlgoUntilChunk(alg1, 7)) return;

// Cancel the algo before exiting test (avoids segfault)
alg1->cancel();

// The first workspace got cloned to a new name
EventWorkspace_sptr ws1 = AnalysisDataService::Instance().retrieveWS<EventWorkspace>("fake1_0");
EventWorkspace_sptr ws1 = AnalysisDataService::Instance().retrieveWS<EventWorkspace>("fake2_0");
TS_ASSERT_EQUALS( ws1->getNumberEvents(), 4*200);

// And this is the current run
EventWorkspace_sptr ws2 = AnalysisDataService::Instance().retrieveWS<EventWorkspace>("fake1");
EventWorkspace_sptr ws2 = AnalysisDataService::Instance().retrieveWS<EventWorkspace>("fake2");
TS_ASSERT_EQUALS( ws2->getNumberEvents(), 3*200);

Poco::Thread::sleep(500);
Expand Down

0 comments on commit 5f97f61

Please sign in to comment.