Skip to content

NIFI-16155 Apply autoResumeState to scheduling of controller services… - #11488

Merged
exceptionfactory merged 3 commits into
apache:mainfrom
bbende:NIFI-16155
Jul 29, 2026
Merged

NIFI-16155 Apply autoResumeState to scheduling of controller services…#11488
exceptionfactory merged 3 commits into
apache:mainfrom
bbende:NIFI-16155

Conversation

@bbende

@bbende bbende commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

… during start-up

Summary

NIFI-16155

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for proposing this improvement @bbende. The functional changes look good. I noted a few minor comments on the new integration test class.


import static org.junit.jupiter.api.Assertions.assertNotEquals;

public class AutoResumeStateControllerServiceIT extends NiFiSystemIT {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The public modifiers can be removed

public void testRootControllerServiceNotResumedWhenAutoResumeDisabled() throws NiFiClientException, IOException, InterruptedException {
final ControllerServiceEntity service = getClientUtil().createRootLevelControllerService("StandardCountService");
getClientUtil().enableControllerService(service);
getClientUtil().waitForControllerServiceRunStatus(service.getId(), "ENABLED");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The ENABLED string could be declared once and reused

}

private void restartWithAutoResumeStateDisabled() throws IOException, InterruptedException {
Thread.sleep(3000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This sleep could be brittle, is there any kind of status that could be polled instead, or is the sleep even needed before stopping?

@bbende

bbende commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @exceptionfactory , addressed the comments

@exceptionfactory exceptionfactory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @bbende, the latest version looks good pending the workflow build completion

@exceptionfactory
exceptionfactory merged commit 0adf611 into apache:main Jul 29, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants