himanshumaurya09876 commented on code in PR #4263:
URL: https://github.com/apache/ambari/pull/4263#discussion_r4614750866


##########
ambari-web/latest/src/screens/Hosts/bulkRecoverHosts.test.tsx:
##########
@@ -274,6 +278,32 @@ describe("bulk Recover Hosts flow", () => {
     expect(mocks.show.mock.calls[1][0].type).toBe(BackgroundOperations);
   });
 
+  it("re-checks recoverability against every component on the host, not just a 
filtered subset", async () => {
+    // The "Filtered Hosts" selection narrows the first fetch to the
+    // filtered component. h1's filtered view looks fully recoverable, but
+    // the unfiltered refetch exposes a second, non-recoverable component on
+    // the same host, so h1 must be skipped and only its filtered component
+    // must never be reinstalled on its own.
+    mocks.batchRequest.mockResolvedValue(scheduleResponse(7));
+    const getKDCSessionState = await openRecoverConfirmation(
+      [apiHost("h1", [component("DATANODE", "INSTALLED")])],
+      [
+        apiHost("h1", [
+          component("DATANODE", "INSTALLED"),
+          component("NODEMANAGER", "STARTED"),
+        ]),
+      ]
+    );
+
+    expect(mocks.getHostComponents).toHaveBeenCalledTimes(1);

Review Comment:
   Addressed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to