Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AS7-4062 - Fix CLITestSuite and DomainTestSuite failures on windows p…

…latform.
  • Loading branch information...
commit 51abeffffe41b4df37ad0fb4a1f4f41aa83d0f1d 1 parent c1f21f5
Dominik Pospisil authored
2  testsuite/domain/src/test/java/org/jboss/as/test/integration/domain/management/util/RolloutPlanBuilder.java
View
@@ -81,7 +81,7 @@ public void addConcurrentGroups(Map<String, RolloutPolicy> concurrentGroups) {
public String buildAsString() {
ModelNode plan = build();
String planString = plan.toString();
- planString = planString.replace(System.getProperty("line.separator"), " ");
+ planString = planString.replace("\n", " ");
return planString;
}
15 ...ite/domain/src/test/java/org/jboss/as/test/integration/domain/suites/CoreResourceManagementTestCase.java
View
@@ -22,6 +22,7 @@
package org.jboss.as.test.integration.domain.suites;
+import java.io.File;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ANY_ADDRESS;
import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.BOOT_TIME;
@@ -118,6 +119,8 @@
private static final ModelNode OTHER_RUNNING_SERVER_ADDRESS = new ModelNode();
private static final ModelNode OTHER_RUNNING_SERVER_PROP_ADDRESS = new ModelNode();
private static final ModelNode OTHER_RUNNING_SERVER_CLASSLOADING_ADDRESS = new ModelNode();
+
+ private static final String fileSeparator = System.getProperty("file.separator");
static {
ROOT_PROP_ADDRESS.add(SYSTEM_PROPERTY, TEST);
@@ -487,7 +490,7 @@ public void testDomainSnapshot() throws Exception {
ModelNode listResult = validateResponse(masterClient.execute(listSnapshotOperation));
Set<String> snapshots = new HashSet<String>();
for (ModelNode curr : listResult.get(NAMES).asList()) {
- snapshots.add(listResult.get(DIRECTORY).asString() + "/" + curr.asString());
+ snapshots.add(listResult.get(DIRECTORY).asString() + fileSeparator + curr.asString());
}
Assert.assertTrue(snapshots.contains(snapshot));
@@ -495,13 +498,13 @@ public void testDomainSnapshot() throws Exception {
ModelNode deleteSnapshotOperation = new ModelNode();
deleteSnapshotOperation.get(OP).set(SnapshotDeleteHandler.OPERATION_NAME);
deleteSnapshotOperation.get(OP_ADDR).setEmptyList();
- deleteSnapshotOperation.get(NAME).set(snapshot.substring(snapshot.lastIndexOf("/") + 1));
+ deleteSnapshotOperation.get(NAME).set(snapshot.substring(snapshot.lastIndexOf(fileSeparator) + fileSeparator.length()));
validateResponse(masterClient.execute(deleteSnapshotOperation), false);
listResult = validateResponse(masterClient.execute(listSnapshotOperation));
snapshots = new HashSet<String>();
for (ModelNode curr : listResult.get(NAMES).asList()) {
- snapshots.add(listResult.get(DIRECTORY).asString() + "/" + curr.asString());
+ snapshots.add(listResult.get(DIRECTORY).asString() + fileSeparator + curr.asString());
}
Assert.assertFalse(snapshots.contains(snapshot));
@@ -838,7 +841,7 @@ private void testSnapshot(ModelNode addr) throws Exception {
ModelNode listResult = validateResponse(masterClient.execute(listSnapshotOperation));
Set<String> snapshots = new HashSet<String>();
for (ModelNode curr : listResult.get(NAMES).asList()) {
- snapshots.add(listResult.get(DIRECTORY).asString() + "/" + curr.asString());
+ snapshots.add(listResult.get(DIRECTORY).asString() + fileSeparator + curr.asString());
}
Assert.assertTrue(snapshots.contains(snapshot));
@@ -846,13 +849,13 @@ private void testSnapshot(ModelNode addr) throws Exception {
ModelNode deleteSnapshotOperation = new ModelNode();
deleteSnapshotOperation.get(OP).set(SnapshotDeleteHandler.OPERATION_NAME);
deleteSnapshotOperation.get(OP_ADDR).set(addr);
- deleteSnapshotOperation.get(NAME).set(snapshot.substring(snapshot.lastIndexOf("/") + 1));
+ deleteSnapshotOperation.get(NAME).set(snapshot.substring(snapshot.lastIndexOf(fileSeparator) + fileSeparator.length()));
validateResponse(masterClient.execute(deleteSnapshotOperation));
listResult = validateResponse(masterClient.execute(listSnapshotOperation));
snapshots = new HashSet<String>();
for (ModelNode curr : listResult.get(NAMES).asList()) {
- snapshots.add(listResult.get(DIRECTORY).asString() + "/" + curr.asString());
+ snapshots.add(listResult.get(DIRECTORY).asString() + fileSeparator + curr.asString());
}
Assert.assertFalse(snapshots.contains(snapshot));
Please sign in to comment.
Something went wrong with that request. Please try again.