Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-49381][K8S][TESTS] Fix SPARK-41388 test case to assert the result #47865

Closed
wants to merge 2 commits into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 26, 2024

What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

Why are the changes needed?

To check the result correctly.

Does this PR introduce any user-facing change?

No, this is a test case change.

How was this patch tested?

Pass the CIs with newly added assertion.

Was this patch authored or co-authored using generative AI tooling?

No.

@@ -853,7 +853,7 @@ class ExecutorPodsAllocatorSuite extends SparkFunSuite with BeforeAndAfter {
pvc2.getMetadata.setCreationTimestamp(now.toString)

when(persistentVolumeClaimList.getItems).thenReturn(Seq(pvc1, pvc2).asJava)
podsAllocatorUnderTest invokePrivate getReusablePVCs("appId", Seq("pvc-1"))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, we only invoke the target method and didn't check the result.

@dongjoon-hyun
Copy link
Member Author

All tests passed.

@dongjoon-hyun dongjoon-hyun marked this pull request as draft August 26, 2024 01:28
@dongjoon-hyun dongjoon-hyun marked this pull request as ready for review August 26, 2024 01:35
val pvc1 = persistentVolumeClaim("pvc-0", "gp2", "200Gi")
val pvc2 = persistentVolumeClaim("pvc-1", "gp2", "200Gi")
val pvc1 = persistentVolumeClaim("pvc-1", "gp2", "200Gi")
val pvc2 = persistentVolumeClaim("pvc-2", "gp2", "200Gi")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PVC names are revised to match with the variable names.

This comment was marked as spam.

This comment was marked as spam.

@dongjoon-hyun
Copy link
Member Author

Thank you, @HyukjinKwon and @yaooqinn . Merged to master/3.5/3.4.

dongjoon-hyun added a commit that referenced this pull request Aug 26, 2024
…esult

### What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

### Why are the changes needed?

To check the result correctly.

### Does this PR introduce _any_ user-facing change?

No, this is a test case change.

### How was this patch tested?

Pass the CIs with newly added assertion.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #47865 from dongjoon-hyun/SPARK-49381.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 5706942)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun added a commit that referenced this pull request Aug 26, 2024
…esult

### What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

### Why are the changes needed?

To check the result correctly.

### Does this PR introduce _any_ user-facing change?

No, this is a test case change.

### How was this patch tested?

Pass the CIs with newly added assertion.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #47865 from dongjoon-hyun/SPARK-49381.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 5706942)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-49381 branch August 26, 2024 02:11
IvanK-db pushed a commit to IvanK-db/spark that referenced this pull request Sep 20, 2024
…esult

### What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

### Why are the changes needed?

To check the result correctly.

### Does this PR introduce _any_ user-facing change?

No, this is a test case change.

### How was this patch tested?

Pass the CIs with newly added assertion.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#47865 from dongjoon-hyun/SPARK-49381.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
szehon-ho pushed a commit to szehon-ho/spark that referenced this pull request Sep 24, 2024
…esult

### What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

### Why are the changes needed?

To check the result correctly.

### Does this PR introduce _any_ user-facing change?

No, this is a test case change.

### How was this patch tested?

Pass the CIs with newly added assertion.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#47865 from dongjoon-hyun/SPARK-49381.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 5706942)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
attilapiros pushed a commit to attilapiros/spark that referenced this pull request Oct 4, 2024
…esult

### What changes were proposed in this pull request?

This PR aims to fix a test case of SPARK-41388 by adding a missed assert.

### Why are the changes needed?

To check the result correctly.

### Does this PR introduce _any_ user-facing change?

No, this is a test case change.

### How was this patch tested?

Pass the CIs with newly added assertion.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#47865 from dongjoon-hyun/SPARK-49381.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants