You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2026/09/19 07:03:18 UTC
(nifi) branch main updated: NIFI-16339 Improved stability of PythonNarDeletionDuringInitIT (#11697)
This is an automated email from the ASF dual-hosted git repository.
pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 49628d70c03 NIFI-16339 Improved stability of PythonNarDeletionDuringInitIT (#11697)
49628d70c03 is described below
commit 49628d70c03dcc096d2f807e2791e363b674fb5e
Author: David Handermann <ex...@apache.org>
AuthorDate: Sat Sep 19 02:03:12 2026 -0500
NIFI-16339 Improved stability of PythonNarDeletionDuringInitIT (#11697)
---
.../python/PythonNarDeletionDuringInitIT.java | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/python/PythonNarDeletionDuringInitIT.java b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/python/PythonNarDeletionDuringInitIT.java
index 845844b3310..6e4050b2f0e 100644
--- a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/python/PythonNarDeletionDuringInitIT.java
+++ b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/python/PythonNarDeletionDuringInitIT.java
@@ -41,7 +41,6 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
@@ -67,7 +66,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
final NarSummaryDTO uploadedNarSummary = narUploadUtil.uploadNar(pythonTestExtensionsNar);
waitFor(narUploadUtil.getWaitForNarStateSupplier(uploadedNarSummary.getIdentifier(), NarState.INSTALLED));
- final DocumentedTypeDTO processorTypeDTO = getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET);
+ final DocumentedTypeDTO processorTypeDTO = waitForProcessorType();
assertNotNull(processorTypeDTO);
final BundleDTO processorBundle = processorTypeDTO.getBundle();
@@ -98,7 +97,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
narUploadUtil.verifyNarSummaries(0);
- assertNull(getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET));
+ waitFor(() -> getProcessorType() == null);
final String pythonProcessorId = pythonProcessor.getId();
waitFor(() -> {
@@ -118,7 +117,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
final NarSummaryDTO uploadedNarSummary = narUploadUtil.uploadNar(pythonTestExtensionsNar);
waitFor(narUploadUtil.getWaitForNarStateSupplier(uploadedNarSummary.getIdentifier(), NarState.INSTALLED));
- final DocumentedTypeDTO processorTypeDTO = getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET);
+ final DocumentedTypeDTO processorTypeDTO = waitForProcessorType();
final BundleDTO processorBundle = processorTypeDTO.getBundle();
final ProcessorEntity firstProcessor = getClientUtil().createProcessor(
@@ -152,7 +151,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
final NarSummaryDTO reuploadedNarSummary = narUploadUtil.uploadNar(pythonTestExtensionsNar);
waitFor(narUploadUtil.getWaitForNarStateSupplier(reuploadedNarSummary.getIdentifier(), NarState.INSTALLED));
- final DocumentedTypeDTO reloadedProcessorType = getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET);
+ final DocumentedTypeDTO reloadedProcessorType = waitForProcessorType();
assertNotNull(reloadedProcessorType);
final ProcessorEntity secondProcessor = getClientUtil().createProcessor(
@@ -187,7 +186,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
final NarSummaryDTO narSummary = narUploadUtil.uploadNar(pythonTestExtensionsNar);
waitFor(narUploadUtil.getWaitForNarStateSupplier(narSummary.getIdentifier(), NarState.INSTALLED));
- final DocumentedTypeDTO processorType = getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET);
+ final DocumentedTypeDTO processorType = waitForProcessorType();
assertNotNull(processorType);
final ProcessorEntity processor = getClientUtil().createProcessor(
@@ -234,7 +233,7 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
final NarSummaryDTO narSummary = narUploadUtil.uploadNar(pythonTestExtensionsNar);
waitFor(narUploadUtil.getWaitForNarStateSupplier(narSummary.getIdentifier(), NarState.INSTALLED));
- final DocumentedTypeDTO processorType = getDocumentedTypeDTO(PYTHON_WRITE_BECH_32_CHARSET);
+ final DocumentedTypeDTO processorType = waitForProcessorType();
final ProcessorEntity processor = getClientUtil().createProcessor(
PYTHON_WRITE_BECH_32_CHARSET,
processorType.getBundle().getGroup(),
@@ -282,14 +281,19 @@ public class PythonNarDeletionDuringInitIT extends NiFiSystemIT {
return narFiles[0];
}
- private DocumentedTypeDTO getDocumentedTypeDTO(final String type) throws NiFiClientException, IOException {
+ private DocumentedTypeDTO waitForProcessorType() throws InterruptedException, NiFiClientException, IOException {
+ waitFor(() -> getProcessorType() != null);
+ return getProcessorType();
+ }
+
+ private DocumentedTypeDTO getProcessorType() throws NiFiClientException, IOException {
final ProcessorTypesEntity allProcessorTypes = getNifiClient().getFlowClient().getProcessorTypes();
if (allProcessorTypes == null || allProcessorTypes.getProcessorTypes() == null) {
return null;
}
return allProcessorTypes.getProcessorTypes().stream()
- .filter(processorType -> processorType.getType().equals(type))
+ .filter(processorType -> processorType.getType().equals(PYTHON_WRITE_BECH_32_CHARSET))
.findAny()
.orElse(null);
}