New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fork in Test := true doesn't run any tests with the new test interface #868

Closed
etorreborre opened this Issue Sep 9, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@etorreborre

etorreborre commented Sep 9, 2013

You can checkout specs2-test and run one of the specifications with sbt 0.13:

sbt>testOnly *examples.HelloWorldSpec*

This is ok, the results are displayed. But:

sbt>set fork in Test := true
sbt>testOnly *examples.HelloWorldSpec*

doesn't display anything

@etorreborre

This comment has been minimized.

Show comment
Hide comment
@etorreborre

etorreborre Sep 9, 2013

Can it be related to this fix? Does that suggest a workaround?

etorreborre commented Sep 9, 2013

Can it be related to this fix? Does that suggest a workaround?

@etorreborre etorreborre closed this Sep 9, 2013

@etorreborre etorreborre reopened this Sep 9, 2013

@ijuma

This comment has been minimized.

Show comment
Hide comment
@ijuma

ijuma Sep 9, 2013

Contributor

Somewhat related, I noticed that "fork in test" (note lowercase test) doesn't work in SBT 0.13 (that is, the tests are executed without forking). Just fork has the desired effect (although with less granular control). So, it seems like more than one issue has creeped up when it comes to this functionality.

Contributor

ijuma commented Sep 9, 2013

Somewhat related, I noticed that "fork in test" (note lowercase test) doesn't work in SBT 0.13 (that is, the tests are executed without forking). Just fork has the desired effect (although with less granular control). So, it seems like more than one issue has creeped up when it comes to this functionality.

@harrah harrah closed this in 277813d Oct 3, 2013

@harrah

This comment has been minimized.

Show comment
Hide comment
@harrah

harrah Oct 3, 2013

Member

The problem is in the specs2 runner: https://github.com/etorreborre/specs2/blob/master/src/main/scala/org/specs2/runner/SbtRunner.scala#L56

The fingerprint that is provided to the framework is only guaranteed to be a SubclassFingerprint or AnnotatedFingerprint and not the exact subclass provided by the framework initially. When not forking, it is the same one, but when forking, it isn't because we can't (and don't want to) assume the user's fingerprint type is Serializable.

Member

harrah commented Oct 3, 2013

The problem is in the specs2 runner: https://github.com/etorreborre/specs2/blob/master/src/main/scala/org/specs2/runner/SbtRunner.scala#L56

The fingerprint that is provided to the framework is only guaranteed to be a SubclassFingerprint or AnnotatedFingerprint and not the exact subclass provided by the framework initially. When not forking, it is the same one, but when forking, it isn't because we can't (and don't want to) assume the user's fingerprint type is Serializable.

@harrah

This comment has been minimized.

Show comment
Hide comment
@harrah

harrah Oct 3, 2013

Member

@ijuma please open a separate issue for fork in test

Member

harrah commented Oct 3, 2013

@ijuma please open a separate issue for fork in test

@ghost ghost assigned harrah Oct 3, 2013

@etorreborre

This comment has been minimized.

Show comment
Hide comment
@etorreborre

etorreborre Oct 5, 2013

Ok, I fixed it. Thanks Mark.

etorreborre commented Oct 5, 2013

Ok, I fixed it. Thanks Mark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment