Type Mismatch on status check

Hi,

I’m getting a type error when running the lastest head version:

Simulation basic-script-exampleATdefault.txt started…
Exception in thread “main” java.lang.RuntimeException: Compilation failed:
gatling:70: error: type mismatch;
found : Int(302)
required: AnyRef
Note: an implicit exists from scala.Int => java.lang.Integer, but
methods inherited from Object are rendered ambiguous. This is to avoid
a blanket implicit which would convert any scala.Int to any AnyRef.
You may wish to use a type ascription: x: java.lang.Integer.
.check(status.eq(302))
^
one error found

at com.excilys.ebi.gatling.app.compiler.ScalaScenarioCompiler.compile(ScalaScenarioCompiler.scala:79)
at com.excilys.ebi.gatling.app.compiler.ScalaScenarioCompiler.run(ScalaScenarioCompiler.scala:49)
at com.excilys.ebi.gatling.app.Gatling$.com$excilys$ebi$gatling$app$Gatling$$run(Gatling.scala:211)

cheers,

Luke.

Hi,

Checks have recently been refactored by @slandelle, I think this is why you have this error. While we take a look at it, you can try to build gatling from this commit: https://github.com/excilys/gatling/commit/7d2cd744d1c929a34d23c80598c7b663f51ad3dd

Cheers,
BluePyth

Oh and I forgot: Thanks for reporting! :wink:

Cheers,
BluePyth

Hi Luke,

I completely rewrote the check API to make it type safe and more efficient.
As a consequence, I had to rename the eq method. This method is actually defined on AnyRef and we shouldn’t have overloaded it in the first place.

So now, we have is/not instead of eq/neq.

Basically, you just have to update in your scenario scripts.

Sincerely,

Steph

2012/2/7 Romain Sertelon <bluepyth@gmail.com>

Cool, thanks. I’ll try that.