|
@@ -31,6 +31,7 @@ import javax.xml.parsers.DocumentBuilder;
|
|
|
import javax.xml.parsers.DocumentBuilderFactory;
|
|
|
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
+import org.apache.hadoop.mapreduce.TaskID;
|
|
|
import org.apache.hadoop.mapreduce.v2.api.records.JobId;
|
|
|
import org.apache.hadoop.mapreduce.v2.api.records.TaskId;
|
|
|
import org.apache.hadoop.mapreduce.v2.api.records.TaskReport;
|
|
@@ -355,9 +356,11 @@ public class TestAMWebServicesTasks extends JerseyTest {
|
|
|
String message = exception.getString("message");
|
|
|
String type = exception.getString("exception");
|
|
|
String classname = exception.getString("javaClassName");
|
|
|
- WebServicesTestUtils.checkStringMatch("exception message",
|
|
|
+ WebServicesTestUtils.checkStringEqual("exception message",
|
|
|
"java.lang.Exception: TaskId string : "
|
|
|
- + "bogustaskid is not properly formed", message);
|
|
|
+ + "bogustaskid is not properly formed"
|
|
|
+ + "\nReason: java.util.regex.Matcher[pattern=" +
|
|
|
+ TaskID.TASK_ID_REGEX + " region=0,11 lastmatch=]", message);
|
|
|
WebServicesTestUtils.checkStringMatch("exception type",
|
|
|
"NotFoundException", type);
|
|
|
WebServicesTestUtils.checkStringMatch("exception classname",
|
|
@@ -419,9 +422,11 @@ public class TestAMWebServicesTasks extends JerseyTest {
|
|
|
String message = exception.getString("message");
|
|
|
String type = exception.getString("exception");
|
|
|
String classname = exception.getString("javaClassName");
|
|
|
- WebServicesTestUtils.checkStringMatch("exception message",
|
|
|
- "java.lang.Exception: Bad TaskType identifier. TaskId string : "
|
|
|
- + "task_0_0000_d_000000 is not properly formed.", message);
|
|
|
+ WebServicesTestUtils.checkStringEqual("exception message",
|
|
|
+ "java.lang.Exception: TaskId string : "
|
|
|
+ + "task_0_0000_d_000000 is not properly formed"
|
|
|
+ + "\nReason: java.util.regex.Matcher[pattern=" +
|
|
|
+ TaskID.TASK_ID_REGEX + " region=0,20 lastmatch=]", message);
|
|
|
WebServicesTestUtils.checkStringMatch("exception type",
|
|
|
"NotFoundException", type);
|
|
|
WebServicesTestUtils.checkStringMatch("exception classname",
|
|
@@ -451,9 +456,11 @@ public class TestAMWebServicesTasks extends JerseyTest {
|
|
|
String message = exception.getString("message");
|
|
|
String type = exception.getString("exception");
|
|
|
String classname = exception.getString("javaClassName");
|
|
|
- WebServicesTestUtils.checkStringMatch("exception message",
|
|
|
+ WebServicesTestUtils.checkStringEqual("exception message",
|
|
|
"java.lang.Exception: TaskId string : "
|
|
|
- + "task_0_m_000000 is not properly formed", message);
|
|
|
+ + "task_0_m_000000 is not properly formed"
|
|
|
+ + "\nReason: java.util.regex.Matcher[pattern=" +
|
|
|
+ TaskID.TASK_ID_REGEX + " region=0,15 lastmatch=]", message);
|
|
|
WebServicesTestUtils.checkStringMatch("exception type",
|
|
|
"NotFoundException", type);
|
|
|
WebServicesTestUtils.checkStringMatch("exception classname",
|
|
@@ -483,9 +490,11 @@ public class TestAMWebServicesTasks extends JerseyTest {
|
|
|
String message = exception.getString("message");
|
|
|
String type = exception.getString("exception");
|
|
|
String classname = exception.getString("javaClassName");
|
|
|
- WebServicesTestUtils.checkStringMatch("exception message",
|
|
|
+ WebServicesTestUtils.checkStringEqual("exception message",
|
|
|
"java.lang.Exception: TaskId string : "
|
|
|
- + "task_0_0000_m is not properly formed", message);
|
|
|
+ + "task_0_0000_m is not properly formed"
|
|
|
+ + "\nReason: java.util.regex.Matcher[pattern=" +
|
|
|
+ TaskID.TASK_ID_REGEX + " region=0,13 lastmatch=]", message);
|
|
|
WebServicesTestUtils.checkStringMatch("exception type",
|
|
|
"NotFoundException", type);
|
|
|
WebServicesTestUtils.checkStringMatch("exception classname",
|