Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Relying on the order of ScalaCheck property evaluation is unsafe #117

Open
larsrh opened this issue Oct 28, 2016 · 0 comments
Open

Relying on the order of ScalaCheck property evaluation is unsafe #117

larsrh opened this issue Oct 28, 2016 · 0 comments

Comments

@larsrh
Copy link

larsrh commented Oct 28, 2016

RemoteSpec relies on the order of ScalaCheck property evaluation in order to clean up the pool in the end. Here's what happens after upgrading to ScalaCheck 1.13.x:

[info] + Remote.roundtrip[List[Int]]: OK, passed 100 tests.
[info] Elapsed time: 0.630 sec 
[info] + Remote.check-serializers: OK, proved property.
[info] Elapsed time: 0.000 sec 
[info] + Remote.add3: OK, passed 100 tests.
[info] Elapsed time: 0.214 sec 
[info] + Remote.roundtrip: OK, passed 100 tests.
[info] Elapsed time: 0.307 sec 
[info] + Remote.check-declarations: OK, proved property.
[info] Elapsed time: 0.000 sec 
[info] + Remote.cleanup: OK, proved property.
[info] Elapsed time: 0.002 sec 
[info] ! Remote.roundtrip[Double]: Exception raised on property evaluation.
[info] > ARG_0: List()
[info] > ARG_1: Map()
[info] > Exception: java.lang.IllegalStateException: Pool not open
[info] org.apache.commons.pool2.impl.BaseGenericObjectPool.assertOpen(BaseGenericObjectPool.java:672)
[info] org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:412)
[info] org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
[info] remotely.transport.netty.NettyTransport$$anonfun$1.apply(Client.scala:36)
[info] remotely.transport.netty.NettyTransport$$anonfun$1.apply(Client.scala:35)
(more stack trace ...)

This blocks an upgrade to ScalaCheck 1.13.x. It can be easily fixed by converting it into a ScalaTest suite. See larsrh/remotely@30b0ae6 for an implementation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant