Skip to content
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

Prevent intermittent MatchError in SelfDescValidationSpec by running tests sequentially #37

Closed
fblundun opened this issue Sep 24, 2015 · 2 comments
Labels
Milestone

Comments

@fblundun
Copy link
Contributor

Found by running the test suite on a loop until it failed.

[error] ! validating a correct self-desc JSON should return the JSON in a Success
[error]   MatchError: null (Resolver.scala:282)
[error] com.snowplowanalytics.iglu.client.Resolver.unsafeLookupSchema(Resolver.scala:282)
[error] com.snowplowanalytics.iglu.client.validation.ValidatableJsonMethods$.getSelfDescribingSchema(validatableJson.scala:182)
[error] com.snowplowanalytics.iglu.client.validation.ValidatableJsonMethods$.validateAsSelfDescribing(validatableJson.scala:197)
[error] com.snowplowanalytics.iglu.client.validation.ValidatableJsonMethods$.validate(validatableJson.scala:109)
[error] com.snowplowanalytics.iglu.client.validation.ValidatableJsonNode.validate(validatableJson.scala:238)
[error] com.snowplowanalytics.iglu.client.validation.SelfDescValidationSpec$$anonfun$e1$1.apply(SelfDescValidationSpec.scala:50)
[error] com.snowplowanalytics.iglu.client.validation.SelfDescValidationSpec$$anonfun$e1$1.apply(SelfDescValidationSpec.scala:50)
[error] com.snowplowanalytics.iglu.client.validation.SelfDescValidationSpec.e1(SelfDescValidationSpec.scala:50)
[error] com.snowplowanalytics.iglu.client.validation.SelfDescValidationSpec$$anonfun$is$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$11.apply(SelfDescValidationSpec.scala:32)
[error] com.snowplowanalytics.iglu.client.validation.SelfDescValidationSpec$$anonfun$is$1$$anonfun$apply$1$$anonfun$apply$2$$anonfun$apply$3$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6$$anonfun$apply$7$$anonfun$apply$8$$anonfun$apply$9$$anonfun$apply$11.apply(SelfDescValidationSpec.scala:32)
@fblundun fblundun added the bug label Sep 24, 2015
@fblundun fblundun added this to the Version 0.4.0 milestone Sep 24, 2015
@fblundun fblundun changed the title Intermittent NullPointerException in SelfDescValidationSpec test Intermittent MatchError in SelfDescValidationSpec test Sep 24, 2015
@fblundun
Copy link
Contributor Author

Apparently caused by cache.get returning Some(null) here.

Probably related to #36

@fblundun
Copy link
Contributor Author

This seems to be solved by adding

    testOptions in Test += Tests.Argument("sequential"),

as described in this specs2 issue: etorreborre/specs2#60

@fblundun fblundun changed the title Intermittent MatchError in SelfDescValidationSpec test Prevent intermittent MatchError in SelfDescValidationSpec by running tests sequentially Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants