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

Fix test ActorCreationTest.testWrongAnonymousInPlaceCreator #30236

Merged
merged 2 commits into from
May 19, 2021
Merged

Fix test ActorCreationTest.testWrongAnonymousInPlaceCreator #30236

merged 2 commits into from
May 19, 2021

Conversation

Captain1653
Copy link
Contributor

@Captain1653 Captain1653 commented May 11, 2021

References #30220

Looks like the method checkCreatorClosingOver was used in deprecated Props.create(Creator), but was forgotten in new Props.create(ActorClass,Creator).

Kind regards

@akka-ci
Copy link

akka-ci commented May 11, 2021

Thank you for your pull request! After a quick sanity check one of the team will reply with 'OK ΤO ΤESΤ' to kick off our automated validation on Jenkins. This compiles the project, runs the tests, and checks for things like binary compatibility and source code formatting. When two team members have also manually reviewed and (perhaps after asking for some amendments) accepted your contribution, it should be good to be merged.

For more details about our contributing process, check out CONTRIBUTING.md - and feel free to ask!

@patriknw
Copy link
Member

OK TO TEST

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label May 12, 2021
Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR is currently being validated by Jenkins labels May 12, 2021
@akka-ci
Copy link

akka-ci commented May 12, 2021

Test FAILed.

@octonato
Copy link
Member

octonato commented May 12, 2021

This failed with...

sbt.ForkMain$ForkError: java.lang.NullPointerException: null
	at akka.actor.AbstractProps.create(AbstractProps.scala:78)
	at akka.actor.AbstractProps.create$(AbstractProps.scala:77)
	at akka.actor.Props$.create(Props.scala:22)
	at akka.actor.PropsCreationSpec.$anonfun$new$9(PropsCreationSpec.scala:68)
	at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
	at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
	at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
	at org.scalatest.Transformer.apply(Transformer.scala:22)
	at org.scalatest.Transformer.apply(Transformer.scala:20)

and it seems that the passed creator is null. It's blowing up on creator.getClass.

Strange!

@octonato
Copy link
Member

I found it. The failure comes from another spec.

val p = Props.create(classOf[OneParamActor], null)

This is passing a null creator.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) labels May 14, 2021
@Captain1653
Copy link
Contributor Author

Use Props(classOf[Actor], OneParamActorCreator) , because Props(classOf[OneParamActor], OneParamActorCreator) throws

type mismatch;
 found   : Class[akka.actor.PropsCreationSpec.OneParamActor](classOf[akka.actor.PropsCreationSpec$$OneParamActor])
 required: Class[akka.actor.Actor]
Note: akka.actor.PropsCreationSpec.OneParamActor <: akka.actor.Actor, but Java-defined class Class is invariant in type T.
You may wish to investigate a wildcard type such as `_ <: akka.actor.Actor`. (SLS 3.2.10)
      val p = Props.create(classOf[OneParamActor], OneParamActorCreator)

@akka-ci akka-ci added tested PR that was successfully built and tested by Jenkins and removed validating PR is currently being validated by Jenkins labels May 14, 2021
@akka-ci
Copy link

akka-ci commented May 14, 2021

Test FAILed.

@Captain1653
Copy link
Contributor Author

Infrastructure error
ssh: Could not resolve hostname a5.local: Name or service not known

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels May 17, 2021
@akka-ci
Copy link

akka-ci commented May 17, 2021

Test PASSed.

Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@octonato octonato merged commit 6573864 into akka:master May 19, 2021
@Captain1653 Captain1653 deleted the actor-creation-test branch May 20, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants