From 0f0152189cf6df0f4b56d92149a60e902eb20be6 Mon Sep 17 00:00:00 2001 From: Ellen Spertus Date: Wed, 25 Jul 2018 20:33:38 -0700 Subject: Fixed bug with reading from TextLine. (Thanks, Bryan\!) Still had to comment out some tests. --- scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scalding/src/test/scala') diff --git a/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala b/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala index dc96003..96c7770 100644 --- a/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala +++ b/scalding/src/test/scala/sandcrawler/HBaseCrossrefScoreTest.scala @@ -178,18 +178,17 @@ class HBaseCrossrefScoreTest extends FlatSpec with Matchers { .arg("debug", "true") .source[Tuple](HBaseCrossrefScore.getHBaseSource(testTable, testHost), grobidSampleData.map(l => new Tuple(l.map(s => {new ImmutableBytesWritable(s)}):_*))) - .source(TextLine(input), List(( + .source(TextLine(input), List( CrossrefString.replace("<>", "Title 1: TNG").replace("<<DOI>>", "DOI-0"), CrossrefString.replace("<<TITLE>>", "Title 1: TNG").replace("<<DOI>>", "DOI-0.5"), CrossrefString.replace("<<TITLE>>", "Title 1: TNG").replace("<<DOI>>", "DOI-0.75"), - CrossrefString.replace("<<TITLE>>", "Title 2: Rebooted").replace("<<DOI>>", "DOI-1")))) - .sink[(String, String, String, String, String, - String)](TypedTsv[(String, String, String, String, String, String)](output)) { + CrossrefString.replace("<<TITLE>>", "Title 2: Rebooted").replace("<<DOI>>", "DOI-1"))) + .sink[(String, String, String)](TypedTsv[(String, String, String)](output)) { outputBuffer => - /* it should "return a 3-element list" in { outputBuffer should have length 3 } + /* it should "return the right first entry" in { val (slug, slug0, slug1, sha1, grobidJson, crossrefJson) = outputBuffer(0) slug shouldBe "title1" -- cgit v1.2.3