Skip to content
Permalink
Browse files

Make ArchiveRecord.getContentBytes consistent,#334 (#335)

  • Loading branch information...
ianmilligan1 authored and ruebot committed Aug 6, 2019
1 parent 2d14b92 commit 1818596475ef412bd95c3817236ba3eb91093864
@@ -107,7 +107,7 @@ class ArchiveRecordImpl(r: SerializableWritable[ArchiveRecordWritable]) extends
val getContentBytes: Array[Byte] = {
if (recordFormat == ArchiveRecordWritable.ArchiveFormat.ARC)
{
ArcRecordUtils.getBodyContent(r.t.getRecord.asInstanceOf[ARCRecord])
ArcRecordUtils.getContent(r.t.getRecord.asInstanceOf[ARCRecord])
} else {
WarcRecordUtils.getContent(r.t.getRecord.asInstanceOf[WARCRecord])
}
@@ -92,7 +92,7 @@ class ArcTest extends FunSuite with BeforeAndAfter {
.collect

languageCounts.foreach {
case ("en", count) => assert(135L == count)
case ("en", count) => assert(140L == count)
case ("et", count) => assert(6L == count)
case ("it", count) => assert(1L == count)
case ("lt", count) => assert(61L == count)
@@ -115,11 +115,11 @@ class ArcTest extends FunSuite with BeforeAndAfter {
case ("image/png", count) => assert(8L == count)
case ("image/jpeg", count) => assert(18L == count)
case ("text/html", count) => assert(132L == count)
case ("text/plain", count) => assert(229L == count)
case ("text/plain", count) => assert(237L == count)
case ("application/xml", count) => assert(1L == count)
case ("application/rss+xml", count) => assert(9L == count)
case ("application/xhtml+xml", count) => assert(1L == count)
case ("application/octet-stream", count) => assert(26L == count)
case ("application/octet-stream", count) => assert(63L == count)
case ("application/x-shockwave-flash", count) => assert(8L == count)
case (_, count) => print(_)
}

0 comments on commit 1818596

Please sign in to comment.
You can’t perform that action at this time.