diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java index d0685690eb58d9c157428f0bef5b4c0722023f0d..9c8ff78edca2cda8f533a5a2ab1f823919ed7363 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/testframework/RemoteConsole.java @@ -145,17 +145,18 @@ public class RemoteConsole final Object result) { detectCallback(callback); - if (entryIndex < commands.size()) + // Sometimes there are no callbacks activated between execution of two commands. + // We invoke them one after another in a while loop. + while (areAllCallbacksFinished() && entryIndex < commands.size()) { ITestCommand cmd = commands.get(entryIndex); - // Sometimes there are no callbacks activated between execution of two commands. - // We invoke them one after another in a while loop. - while (cmd.isValidOnSucess(result) && areAllCallbacksFinished()) + if (cmd.isValidOnSucess(result)) { - while (areAllCallbacksFinished()) - { - executeCommand(); - } + executeCommand(); + } else + { + // expected failure + return; } } } @@ -168,8 +169,8 @@ public class RemoteConsole if (entryIndex < commands.size()) { ITestCommand cmd = commands.get(entryIndex); - // It doesn't need to be the last callbacks that fails, - // and it should rather be the last command. + // It doesn't need to be the last callback that fails, + // but command that expects failure should be the last one. if (cmd.isValidOnFailure(callback, failureMessage, throwable)) { executeCommand(); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParametersTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/URLMethodWithParametersTest.java similarity index 89% rename from openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParametersTest.java rename to openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/URLMethodWithParametersTest.java index 64dc7d83ffa2fbb646396f85ed649fd2c8059dfd..8b161707e42b864b467fdcb83e682ab1131f6726 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/basic/URLMethodWithParametersTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/URLMethodWithParametersTest.java @@ -14,11 +14,13 @@ * limitations under the License. */ -package ch.systemsx.cisd.openbis.generic.shared.basic; +package ch.systemsx.cisd.openbis.generic.shared; import org.testng.AssertJUnit; import org.testng.annotations.Test; +import ch.systemsx.cisd.openbis.generic.shared.basic.URLMethodWithParameters; + /** * *