These are chat archives for etorreborre/specs2

1st
Feb 2019
Edmondo Porcu
@edmondo1984
Feb 01 07:32
@etorreborre the context I am trying to get initialized only once, it's something I am trying to do using an atomic boolean but it seems that although SBT is not forking my tests, the variable is reset at each execution, probably there is some magical class loader
Eric Torreborre
@etorreborre
Feb 01 09:26
have you tried fork in test := true?
Edmondo Porcu
@edmondo1984
Feb 01 10:52
yes but that will make it even worse right? It will be separate jvms
Eric Torreborre
@etorreborre
Feb 01 11:28
sorry yes, I was actually confused by your previous sentence about SBT. Did you put your variable in an object?
Edmondo Porcu
@edmondo1984
Feb 01 16:08
Yes
It seems that the classloader will re-initialize the object every time I do sbt testOnly