mirror of https://github.com/apache/nifi.git
NIFI-12387 Initialize Controller Service Comments with Empty String
The empty string allows controller service configuration to be saved without flow configuration history recording a configuration change for comments. This closes #8275 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
693b187396
commit
2e3f83eb54
|
@ -136,6 +136,7 @@ public class StandardControllerServiceNode extends AbstractComponentNode impleme
|
|||
this.active = new AtomicBoolean();
|
||||
setControllerServiceAndProxy(implementation, proxiedControllerService, invocationHandler);
|
||||
stateTransition = new ServiceStateTransition(this);
|
||||
this.comment = "";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -860,6 +860,7 @@ public class TestFlowController {
|
|||
assertEquals(ServiceA.class.getSimpleName(), controllerServiceNode.getComponentType());
|
||||
assertEquals(ServiceA.class.getCanonicalName(), controllerServiceNode.getComponent().getClass().getCanonicalName());
|
||||
assertEquals(LogLevel.WARN, controllerServiceNode.getBulletinLevel());
|
||||
assertEquals("", controllerServiceNode.getComments());
|
||||
|
||||
controller.getReloadComponent().reload(controllerServiceNode, ServiceB.class.getName(), coordinate, Collections.emptySet());
|
||||
|
||||
|
@ -868,6 +869,7 @@ public class TestFlowController {
|
|||
assertEquals(id, controllerServiceNode.getComponent().getIdentifier());
|
||||
assertEquals(coordinate.getCoordinate(), controllerServiceNode.getBundleCoordinate().getCoordinate());
|
||||
assertEquals(LogLevel.WARN, controllerServiceNode.getBulletinLevel());
|
||||
assertEquals("", controllerServiceNode.getComments());
|
||||
|
||||
// in this test we happened to change between two services that have different canonical class names
|
||||
// but in the running application the DAO layer would call verifyCanUpdateBundle and would prevent this so
|
||||
|
|
Loading…
Reference in New Issue