third attempt to fix the failing tests windows

Original commit: elastic/x-pack-elasticsearch@30bb93ce4a
This commit is contained in:
uboness 2015-05-22 11:36:50 +02:00
parent 8e13a03069
commit ea91c1e617
1 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,8 @@ public class DataAttachmentTests extends ElasticsearchTestCase {
Attachment attachment = DataAttachment.YAML.create(data); Attachment attachment = DataAttachment.YAML.create(data);
InputStream input = attachment.bodyPart().getDataHandler().getInputStream(); InputStream input = attachment.bodyPart().getDataHandler().getInputStream();
String content = Streams.copyToString(new InputStreamReader(input, Charsets.UTF_8)); 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"));
} }
} }