Skip to content

Commit 8183285

Browse files
committed
Revert some changes
1 parent b765edf commit 8183285

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

src/org/labkey/test/pipeline/ExperimentGraph.java

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.labkey.test.pipeline;
1717

18+
import org.apache.commons.lang3.StringUtils;
1819
import org.labkey.test.BaseWebDriverTest;
1920
import org.labkey.test.Locator;
2021
import org.labkey.test.components.Component;
@@ -115,26 +116,39 @@ public void validate(PipelineTestParams tp)
115116
String[] names = tp.getExperimentLinks();
116117
for (String name : names)
117118
{
118-
assertNodePresent(name);
119-
String baseName = getBaseName(tp);
120-
assertInputPresent(tp.getParametersFile());
121-
for (String inputExt : tp.getInputExtensions())
122-
assertInputPresent(baseName + inputExt);
123-
for (String outputExt : tp.getOutputExtensions())
124-
assertOutputPresent(baseName + outputExt);
119+
if (getWrapper().isTextPresent(name))
120+
{
121+
assertNodePresent(name);
122+
String baseName = getBaseName(tp);
123+
assertInputPresent(tp.getParametersFile());
124+
for (String inputExt : tp.getInputExtensions())
125+
assertInputPresent(baseName + inputExt);
126+
for (String outputExt : tp.getOutputExtensions())
127+
assertOutputPresent(baseName + outputExt);
128+
return;
129+
}
125130
}
131+
132+
assertTrue("Unable to find experiment links: " + StringUtils.join(names, ", "), false);
126133
}
127134

128135
private String getBaseName(PipelineTestParams tp)
129136
{
130137
String[] sampleNames = tp.getSampleNames();
131-
for (String sampleName : sampleNames)
138+
if (sampleNames.length == 0)
139+
{
140+
// AbstractMS2SearchProtocol.getJoinedBaseName() is hard-coded to use "all"
141+
return "all";
142+
}
143+
else
132144
{
133-
if (getWrapper().isTextPresent(sampleName))
134-
return sampleName;
145+
for (String sampleName : sampleNames)
146+
{
147+
if (getWrapper().isTextPresent(sampleName))
148+
return sampleName;
149+
}
135150
}
136151

137-
// AbstractMS2SearchProtocol.getJoinedBaseName() is hard-coded to use "all"
138152
// Probably fail later, but simpler than checking for null return.
139153
return "all";
140154
}

0 commit comments

Comments
 (0)