SOLR-2854: fix failing test by getting stream before size

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1189714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2011-10-27 12:06:12 +00:00
parent 068d7ca7dc
commit 29a17b885f
1 changed files with 1 additions and 2 deletions

View File

@ -88,10 +88,9 @@ public class ContentStreamTest extends LuceneTestCase
ContentStreamBase stream = new ContentStreamBase.URLStream( url );
in = stream.getStream(); // getStream is needed before getSize is valid
assertEquals( content.length, stream.getSize().intValue() );
// Test the stream
in = stream.getStream();
try {
assertTrue( IOUtils.contentEquals(
new ByteArrayInputStream(content), in ) );