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

@ZeebeProcessTest and injection is ignored when placed on a super class #604

Closed
namero999 opened this issue Dec 13, 2022 · 4 comments · Fixed by #605
Closed

@ZeebeProcessTest and injection is ignored when placed on a super class #604

namero999 opened this issue Dec 13, 2022 · 4 comments · Fixed by #605
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@namero999
Copy link

There's a lot of boilerplate when it comes to activating and completing jobs. It would be ideal to place those common methods in a super class, annotated as ZeebeProcessTest and with client/engine field injection. However, in this case no field gets injected.

@ZeebeProcessTest
public abstract class AbstractZeebeTest {

  protected ZeebeTestEngine engine;
  protected ZeebeClient client;

  @SneakyThrows
  public void waitForIdleState() {
    engine.waitForIdleState(ofSeconds(1));
  }

}
public class PlanTest extends AbstractZeebeTest {

  @Test
  public void planTest() {
    waitForIdleState(); // engine will be null
  }

}

It would be great if this worked.

@namero999 namero999 added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Dec 13, 2022
@remcowesterhoud
Copy link
Contributor

remcowesterhoud commented Dec 14, 2022

Thanks for reporting @namero999. I've created a PR for it, so if all goes well this should become possible with the 8.2.0 release. This should be released somewhere around April 2023.

@remcowesterhoud remcowesterhoud self-assigned this Dec 14, 2022
@namero999
Copy link
Author

Thank you very much for the prompt feedback!

Since you mentioned the 8.2 release in April, I thought this fix was dependent on platform features. But by checking on the PR, it doesn't seem the case.

Would it be possible to push a minor version bump of the zeebe-process-test library with this improvement before April?

@remcowesterhoud
Copy link
Contributor

remcowesterhoud commented Dec 14, 2022

We want to keep the versioning of this project and the platform aligned. As a result creating a minor release for here would mean we have to do a minor bump for the entire platform.

What I can do is make it part of the next patch release, which should be in January. A new feature shouldn't be part of a patch release, but I feel like this is a gray area between being a bug and feature.

@remcowesterhoud remcowesterhoud added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes an issue or PR as a feature, i.e. new behavior labels Dec 14, 2022
@namero999
Copy link
Author

namero999 commented Dec 14, 2022

Understood. Yes, I've meant patch bump, sorry.

As you point out, it's not a bug per se, but quite a surprising behaviour so maybe worth a release. If that is possible, it would be great. Looking forward to factor out lots of utils code :)

@ghost ghost closed this as completed in c427e1a Dec 15, 2022
ghost pushed a commit that referenced this issue Dec 15, 2022
608: [Backport stable/8.0] Inject ZPT related fields into superclasses r=remcowesterhoud a=github-actions[bot]

# Description
Backport of #605 to `stable/8.0`.

relates to #604

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
ghost pushed a commit that referenced this issue Dec 15, 2022
609: [Backport stable/8.1] Inject ZPT related fields into superclasses r=remcowesterhoud a=github-actions[bot]

# Description
Backport of #605 to `stable/8.1`.

relates to #604

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants