Skip to content

Commit dbe29e4

Browse files
committed
Java SDK: Drop the unused switch in the condition test's decider
1 parent f118e9e commit dbe29e4

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

‎java-sdk/sdk/src/test/kotlin/org/apache/airflow/sdk/ClientTest.kt‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ private class FakeTransport(
4646
val stored: TaskStateStoreResult? = null,
4747
) : org.apache.airflow.sdk.execution.Client {
4848
val calls = mutableListOf<StateStoreCall>()
49-
val skipped = mutableListOf<String>()
5049

5150
override fun getConnection(id: String): ConnectionResult = connection
5251

@@ -106,9 +105,7 @@ private class FakeTransport(
106105
calls.add(StateStoreCall("clear", tiId))
107106
}
108107

109-
override fun skipDownstreamTasks(taskIds: List<String>) {
110-
skipped += taskIds
111-
}
108+
override fun skipDownstreamTasks(taskIds: List<String>) = Unit
112109
}
113110

114111
class ClientTest {

‎java-sdk/sdk/src/test/kotlin/org/apache/airflow/sdk/ConditionTest.kt‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,12 @@ import org.junit.jupiter.api.Assertions.assertTrue
2727
import org.junit.jupiter.api.DisplayName
2828
import org.junit.jupiter.api.Test
2929

30-
/** A condition the tests register; what it decides is driven from the runtime tests. */
30+
/** A condition the tests register; it always holds. */
3131
class HasRows : ConditionTask {
3232
override fun decide(
3333
context: Context,
3434
client: Client,
35-
): Boolean = decision
36-
37-
companion object {
38-
var decision: Boolean = true
39-
}
35+
): Boolean = true
4036
}
4137

4238
internal class ConditionTest {

0 commit comments

Comments
 (0)