32
$\begingroup$
 org.apache.kafka.clients.consumer.ConsumerRecords@1f6d27cc was empty
    ScalaTestFailureLocation: SorterTest at (SorterTest.scala:75107)
    org.scalatest.exceptions.TestFailedException: org.apache.kafka.clients.consumer.ConsumerRecords@1f6d27cc was empty
        at org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:6597)
        at org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:70102)
    	at org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:75107) 
    	at org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:6597)
        at SorterTest.$anonfun$new$4(SorterTest.scala:72104)
    	at SorterTest.$anonfun$new$4$adapted(SorterTest.scala:6597)
    	at scala.collection.immutable.List.foreach(List.scala:84116)
    	at SorterTest.$anonfun$new$3(SorterTest.scala:69101)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:83115)
        at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:77109)
        at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:69101)
    	at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:6698)
        at org.scalatest.Transformer.apply(Transformer.scala:69101)
        at org.scalatest.Transformer.apply(Transformer.scala:6799)
        at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:6597)
        at org.scalatest.TestSuite.withFixture(TestSuite.scala:85117)
        at org.scalatest.TestSuite.withFixture$(TestSuite.scala:83115)
        at org.scalatest.FunSuite.withFixture(FunSuite.scala:69101)
        at org.scalatest.FunSuiteLike.invokeWithFixture$1(FunSuiteLike.scala:73105)
        at org.scalatest.FunSuiteLike.$anonfun$runTest$1(FunSuiteLike.scala:72104)
        at org.scalatest.SuperEngine.runTestImpl(Engine.scala:6597)
        at org.scalatest.FunSuiteLike.runTest(FunSuiteLike.scala:84116)
        at org.scalatest.FunSuiteLike.runTest$(FunSuiteLike.scala:69101)
        at org.scalatest.FunSuite.runTest(FunSuite.scala:75107)
        at org.scalatest.FunSuiteLike.$anonfun$runTests$1(FunSuiteLike.scala:6597)
        at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:70102)
        at scala.collection.immutable.List.foreach(List.scala:75107)
        at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:6597)

Why is this program failing?

Hint:

I've tried to duplicate the code but I got the same problem...

$\endgroup$
9
  • $\begingroup$ I tried to run my test but it just fails... $\endgroup$
    – Turvo
    Commented Mar 14, 2019 at 12:47
  • 6
    $\begingroup$ I really think this should be here, just read it carefully ;P $\endgroup$
    – Turvo
    Commented Mar 14, 2019 at 12:57
  • 7
    $\begingroup$ Voting to close, needs [mcve] ;) $\endgroup$
    – Rubio
    Commented Mar 14, 2019 at 13:05
  • 1
    $\begingroup$ This is a cipher puzzle, just a bit different ^^ $\endgroup$
    – Turvo
    Commented Mar 14, 2019 at 13:10
  • 8
    $\begingroup$ I just love how this looks like a bad StackOverflow question yet it still blatantly looks like a puzzle $\endgroup$
    – Belhenix
    Commented Mar 15, 2019 at 7:16

2 Answers 2

33
$\begingroup$

The program is failing because:

Kafka Hates You

It would seem that:

The feeling is mutual. Taking the ascii value of the numbers at the end of the error messages yields: KAFKA HATES ME BECAUSE I HATE KAFKA.

$\endgroup$
4
  • 1
    $\begingroup$ That's it!! It was my first puzzle so it maybe was too easy, I'll try to create a harder one :P $\endgroup$
    – Turvo
    Commented Mar 14, 2019 at 15:21
  • 5
    $\begingroup$ @Turvo don't forget about the "many eyes" effect - sometimes puzzles seem artificially easy because it was solved quickly, but don't forget that there were also 1500+ people who did not solve it. $\endgroup$
    – Brandon_J
    Commented Mar 14, 2019 at 23:23
  • 2
    $\begingroup$ Knowing nothing about Scala - would those normally be line numbers? I feel like in any programming language if your line numbers get into 5 digits, you're doing something wrong. I was instantly suspicious of that, especially the 80+ thousand numbers... $\endgroup$ Commented Mar 15, 2019 at 12:23
  • $\begingroup$ You are right, those numbers are suspicious. I've used uppercase letter's ascii code followed by lowercase letter's because using just 2 or 3 numbers would be too easy (That's why the hint mentioned "duplicated code") $\endgroup$
    – Turvo
    Commented Mar 15, 2019 at 12:52
15
$\begingroup$

To solve it in the spirit of the riddle, we run:

grep -o ':.*)' < input | sed 's/[^0-9]//g' | xargs node -e "console.log(process.argv.slice(1).map(x => parseInt(parseInt(x.slice(2)) > 122 ? x.slice(1) : x.slice(2))).map(x => String.fromCharCode(x)).join(''))"

which provides us with the reason:

kafkahatesmebecauseihatekafka

So it is unlikely that the problem will be resolved soon...

$\endgroup$
5
  • 1
    $\begingroup$ This is a fantastic answer. $\endgroup$
    – LeppyR64
    Commented Mar 15, 2019 at 2:45
  • 2
    $\begingroup$ You can also do this by evaluating String.fromCharCode(...document.querySelector("#question code").textContent.match(/:\d+/g).map(s=>s.slice(3))) in the web console. $\endgroup$
    – Neil
    Commented Mar 15, 2019 at 9:58
  • $\begingroup$ I love your answers! Nice job! $\endgroup$
    – Turvo
    Commented Mar 15, 2019 at 10:03
  • 3
    $\begingroup$ fetch("https://api.stackexchange.com/2.2/questions/80670?&site=puzzling&filter=withbody").then(f=>f.json().then(r=>console.log(String.fromCharCode(...r.items[0].body.match(/:\d+/g).map(s=>s.slice(3)))))) is another approach. $\endgroup$
    – Neil
    Commented Mar 15, 2019 at 10:06
  • $\begingroup$ Pipe stack trace into perl -lne 'if (/\:(\d\d)(\d+)\)/) { print chr($1) . " " . chr($2)}' $\endgroup$ Commented Mar 15, 2019 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.