fixing failing test on windows... now for realz

Original commit: elastic/x-pack-elasticsearch@159144f18c
This commit is contained in:
uboness 2015-05-21 22:23:30 +02:00
parent 47e50008a0
commit 8e13a03069
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ public class DataAttachmentTests extends ElasticsearchTestCase {
Attachment attachment = DataAttachment.JSON.create(data); Attachment attachment = DataAttachment.JSON.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("{\n \"key\" : \"value\"" + System.lineSeparator() + "}")); assertThat(content, is("{" + System.lineSeparator() + " \"key\" : \"value\"" + System.lineSeparator() + "}"));
} }
@Test @Test
@ -38,6 +38,6 @@ 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("---\nkey: \"value\"" + System.lineSeparator())); assertThat(content, is("---" + System.lineSeparator() + "key: \"value\"" + System.lineSeparator()));
} }
} }