aglinxinyuan commented on code in PR #4444: URL: https://github.com/apache/texera/pull/4444#discussion_r3171244651
########## amber/src/test/scala/org/apache/texera/amber/engine/architecture/scheduling/WorkflowExecutionCoordinatorSpec.scala: ########## @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.texera.amber.engine.architecture.scheduling + +import org.apache.texera.amber.core.executor.OpExecInitInfo +import org.apache.texera.amber.core.virtualidentity.{ + ExecutionIdentity, + OperatorIdentity, + PhysicalOpIdentity, + WorkflowIdentity +} +import org.apache.texera.amber.core.workflow.PhysicalOp +import org.apache.texera.amber.engine.architecture.controller.execution.WorkflowExecution +import org.scalatest.flatspec.AnyFlatSpec + +class WorkflowExecutionCoordinatorSpec extends AnyFlatSpec { + + private def region(regionId: Long, opId: String): Region = { + val physicalOp = PhysicalOp( + PhysicalOpIdentity(OperatorIdentity(opId), "main"), + WorkflowIdentity(0), + ExecutionIdentity(0), + OpExecInitInfo.Empty + ) + Region(RegionIdentity(regionId), Set(physicalOp), Set.empty) + } + + "WorkflowExecutionCoordinator.jumpToRegionContainingOperator" should "make the next scheduled region contain the target operator's region" in { Review Comment: Added 5 more cases: multiple sequential jumps interleaved with region pulls, single-call rejection of an unknown operator (no-op), repeated rejections of unknown operators leaving the schedule untouched, jump after the schedule is exhausted, and forward jump skipping unpulled regions. 6 cases total. -- 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]
