Skip to content

Commit

Permalink
Refs #11458. Add 0.5s pause between writing and reading file.
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Mar 31, 2015
1 parent f946f7f commit 80993c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/DataHandling/test/CMakeLists.txt
@@ -1,7 +1,7 @@
if ( CXXTEST_FOUND )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} )

include_directories ( ../../TestHelpers/inc )
include_directories ( ../../TestHelpers/inc ../../Algorithms/inc )
# This variable is used within the cxxtest_add_test macro to build this helper class into the test executable.
# It will go out of scope at the end of this file so doesn't need un-setting
set ( TESTHELPER_SRCS ../../TestHelpers/src/TearDownWorld.cpp
Expand All @@ -12,7 +12,7 @@ if ( CXXTEST_FOUND )
)

cxxtest_add_test ( DataHandlingTest ${TEST_FILES} )
target_link_libraries( DataHandlingTest DataHandling )
target_link_libraries( DataHandlingTest DataHandling Algorithms )
add_dependencies ( DataHandlingTest Algorithms MDAlgorithms )
add_dependencies ( FrameworkTests DataHandlingTest )
# Test data
Expand Down
Expand Up @@ -11,6 +11,7 @@
#include "MantidGeometry/Instrument.h"
#include "MantidGeometry/Instrument/Component.h"
#include "MantidGeometry/Instrument/FitParameter.h"
#include "MantidAlgorithms/Pause.h"
#include <fstream>
#include <Poco/File.h>

Expand All @@ -21,6 +22,7 @@ using namespace Mantid::DataHandling;
using namespace Mantid::DataObjects;
using namespace Mantid::Kernel;
using namespace Mantid::API;
using namespace Mantid::Algorithms;

using namespace std;

Expand Down Expand Up @@ -331,6 +333,13 @@ class LoadFullprofResolutionTest : public CxxTest::TestSuite
string filename("TestWorskpace.irf");
generate1BankIrfFile(filename);

//test randomly failing because file is not found
//adding a short pause between when the file is written and read
Pause pause;
pause.initialize();
pause.setProperty("Duration",0.5);
pause.execute();

// Load workspace group wsName with one workspace
load_GEM(1,"LoadFullprofResolutionWorkspace");

Expand Down

0 comments on commit 80993c5

Please sign in to comment.