5858public abstract class StudyBaseTest extends BaseWebDriverTest
5959{
6060 protected static final File ARCHIVE_TEMP_DIR = StudyHelper .getStudyTempDir ();
61+ private static Boolean _specimenModulePresent ;
62+
6163 protected int datasetCount = getDatasetCount ();
6264 protected int visitCount = 65 ;
6365
@@ -74,6 +76,14 @@ protected void setupRequestStatuses()
7476 new SpecimenHelper (this ).setupRequestStatuses ();
7577 }
7678
79+ public boolean isSpecimenModulePresent ()
80+ {
81+ if (null == _specimenModulePresent )
82+ _specimenModulePresent = _containerHelper .getAllModules ().contains ("specimen" );
83+
84+ return _specimenModulePresent ;
85+ }
86+
7787 protected final AuditLogHelper _auditLogHelper = new AuditLogHelper (this );
7888
7989 @ Override
@@ -130,13 +140,19 @@ protected void startSpecimenImport(int completeJobsExpected)
130140
131141 protected void startSpecimenImport (int completeJobsExpected , File specimenArchive )
132142 {
133- _specimenImporter = new SpecimenImporter (new File (StudyHelper .getStudySubfolderPath ()), specimenArchive , ARCHIVE_TEMP_DIR , getFolderName (), completeJobsExpected );
134- _specimenImporter .startImport ();
143+ if (isSpecimenModulePresent ())
144+ {
145+ _specimenImporter = new SpecimenImporter (new File (StudyHelper .getStudySubfolderPath ()), specimenArchive , ARCHIVE_TEMP_DIR , getFolderName (), completeJobsExpected );
146+ _specimenImporter .startImport ();
147+ }
135148 }
136149
137150 protected void waitForSpecimenImport ()
138151 {
139- _specimenImporter .waitForComplete ();
152+ if (isSpecimenModulePresent ())
153+ {
154+ _specimenImporter .waitForComplete ();
155+ }
140156 }
141157
142158 protected void setExpectSpecimenImportError (boolean expected )
0 commit comments