From ea91c1e6176595ec4cf2985a5cdb89637dc1db90 Mon Sep 17 00:00:00 2001 From: uboness Date: Fri, 22 May 2015 11:36:50 +0200 Subject: [PATCH] third attempt to fix the failing tests windows Original commit: elastic/x-pack-elasticsearch@30bb93ce4a71f2073480b853a9ca02cc2e618cb2 --- .../watcher/actions/email/DataAttachmentTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java b/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java index f491249fbeb..133643c967e 100644 --- a/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java +++ b/src/test/java/org/elasticsearch/watcher/actions/email/DataAttachmentTests.java @@ -38,6 +38,8 @@ public class DataAttachmentTests extends ElasticsearchTestCase { Attachment attachment = DataAttachment.YAML.create(data); InputStream input = attachment.bodyPart().getDataHandler().getInputStream(); String content = Streams.copyToString(new InputStreamReader(input, Charsets.UTF_8)); - assertThat(content, is("---" + System.lineSeparator() + "key: \"value\"" + System.lineSeparator())); + // the yaml factory in es always emits unix line breaks + // this seems to be a bug in jackson yaml factory that doesn't default to the platform line break + assertThat(content, is("---\nkey: \"value\"\n")); } }