azkaban-aplcache

Details

diff --git a/azkaban-common/src/test/java/azkaban/executor/mail/DefaultMailCreatorTest.java b/azkaban-common/src/test/java/azkaban/executor/mail/DefaultMailCreatorTest.java
index b412d41..462216d 100644
--- a/azkaban-common/src/test/java/azkaban/executor/mail/DefaultMailCreatorTest.java
+++ b/azkaban-common/src/test/java/azkaban/executor/mail/DefaultMailCreatorTest.java
@@ -96,7 +96,7 @@ public class DefaultMailCreatorTest {
     assertTrue(mailCreator.createErrorEmail(
         executableFlow, message, azkabanName, scheme, clientHostname, clientPortNumber));
     assertEquals("Flow 'mail-creator-test' has failed on unit-tests", message.getSubject());
-    assertEquals(read("errorEmail.html"), message.getBody());
+    assertEquals(read("errorEmail.html").replaceAll("\\s+", ""), message.getBody().replaceAll("\\s+", ""));
   }
 
   @Test
@@ -106,7 +106,7 @@ public class DefaultMailCreatorTest {
     assertTrue(mailCreator.createFirstErrorMessage(
         executableFlow, message, azkabanName, scheme, clientHostname, clientPortNumber));
     assertEquals("Flow 'mail-creator-test' has encountered a failure on unit-tests", message.getSubject());
-    assertEquals(read("firstErrorMessage.html"), message.getBody());
+    assertEquals(read("firstErrorMessage.html").replaceAll("\\s+", ""), message.getBody().replaceAll("\\s+", ""));
   }
 
   @Test
@@ -117,7 +117,7 @@ public class DefaultMailCreatorTest {
     assertTrue(mailCreator.createSuccessEmail(
         executableFlow, message, azkabanName, scheme, clientHostname, clientPortNumber));
     assertEquals("Flow 'mail-creator-test' has succeeded on unit-tests", message.getSubject());
-    assertEquals(read("successEmail.html"), message.getBody());
+    assertEquals(read("successEmail.html").replaceAll("\\s+", ""), message.getBody().replaceAll("\\s+", ""));
   }
 
   private String read(String file) throws Exception {
diff --git a/azkaban-web-server/src/test/java/azkaban/webapp/servlet/ExecutionFlowViewTest.java b/azkaban-web-server/src/test/java/azkaban/webapp/servlet/ExecutionFlowViewTest.java
index bebfa38..09fe06a 100644
--- a/azkaban-web-server/src/test/java/azkaban/webapp/servlet/ExecutionFlowViewTest.java
+++ b/azkaban-web-server/src/test/java/azkaban/webapp/servlet/ExecutionFlowViewTest.java
@@ -12,29 +12,29 @@ import azkaban.fixture.VelocityTemplateTestUtil;
  * Test flow execution page.
  */
 public class ExecutionFlowViewTest {
-  
-  private static final String EXTERNAL_ANALYZER_ELEMENT = 
+
+  private static final String EXTERNAL_ANALYZER_ELEMENT =
       "<li><a id=\"analyzerButton\" href=\"http://elephant.linkedin.com/\" "
       + "class=\"btn btn-info btn-sm\" type=\"button\" target=\"_blank\" "
       + "title=\"Analyze job in Dr. Elephant\">Dr. Elephant</a></li>";
   /**
-   * Test aims to check that the external analyzer button is displayed 
+   * Test aims to check that the external analyzer button is displayed
    * in the page.
-   * @throws Exception the exception 
+   * @throws Exception the exception
    */
   @Test
   public void testExternalAnalyzerButton() throws Exception {
     VelocityContext context = VelocityContextTestUtil.getInstance();
-    
+
     context.put("execid", 1);
     context.put("executionExternalLinkURL", "http://elephant.linkedin.com/");
     context.put("executionExternalLinkLabel", "Dr. Elephant");
     context.put("projectId", 1001);
     context.put("projectName", "user-hello-pig-azkaban");
     context.put("flowid", 27);
-    
-    String result = 
-        VelocityTemplateTestUtil.renderTemplate("executingflowpage", context);
-    assertTrue(result.contains(EXTERNAL_ANALYZER_ELEMENT));
+
+    String result =
+        VelocityTemplateTestUtil.renderTemplate("executingflowpage", context).replaceAll("\\s+", "");
+    assertTrue(result.contains(EXTERNAL_ANALYZER_ELEMENT.replaceAll("\\s+", "")));
   }
 }