Copilot commented on code in PR #6558:
URL: https://github.com/apache/texera/pull/6558#discussion_r3610179189


##########
frontend/src/app/common/service/computing-unit/computing-unit-status/computing-unit-status.service.spec.ts:
##########
@@ -143,4 +144,83 @@ describe("ComputingUnitStatusService", () => {
     service.selectComputingUnit(5, 8);
     expect(resetCount).toBe(1);
   });
+
+  it("getAllComputingUnits() replays the current list and forwards later 
updates", () => {
+    const emissions: DashboardWorkflowComputingUnit[][] = [];
+    service.getAllComputingUnits().subscribe(units => emissions.push(units));
+
+    // BehaviorSubject replays the current value; construction seeded it with 
of([]).

Review Comment:
   The comment is inaccurate: `allComputingUnitsSubject` is a `BehaviorSubject` 
initialized with `[]`, not seeded with `of([])` (the `of([])` is used by the 
managing stub’s `listComputingUnits`). Updating this avoids misleading future 
readers about why the initial emission is `[]`.



-- 
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]

Reply via email to