These are chat archives for etorreborre/specs2

15th
Mar 2018
Igal Tabachnik
@hmemcpy
Mar 15 2018 18:56
Hi @etorreborre!
I was investigating a bug I found in bazel, and it took me a while to track it
We had some issues with tests that were generated with Fragments.foreach appearing in bazel incorrectly
The very long story short is: bazel's junit support builds up a (hash) map of Descriptions to test case info
Now, apparently, JUnit uses either the description text OR a dedicated id as the hashCode implementation in Description
What I found was after a lot of tracing, that specs2 creates Descriptions for simple fragments using the hashcode of the fragment's location value
And in case of a Fragment.foreach loop, they all have the same location!
Igal Tabachnik
@hmemcpy
Mar 15 2018 19:03
Now, I'm going to fix it in Bazel so it doesn't use the Description object directly as the hash key, but on your end, do you think this is correct for the Descriptions to have the same id when they originate in the same fragment loop?
Eric Torreborre
@etorreborre
Mar 15 2018 22:31
I think this is an oversight on my side but I don't remember the possible impacts of changing the hashcode to something more unique