Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Reset path to avoid flaky tests #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LALAYANG
Copy link

What is the purpose of this change

This PR cleans the state pollued by the test com.vmware.admiral.common.util.ReflectionUtilsTest.testSetPathAnnotation.

It may be better to clean state pollutions so that some other tests won't fail in the future due to the shared state pollution.

Reproduce test failure

Run the test twice in the same JVM.

Expected result:

The tests should run successfully when multiple tests that use this state are run in the same JVM.

Actual result:

We get failure:
Failed tests: ReflectionUtilsTest.testSetPathAnnotation:32 expected:</[foo]> but was:</[bar]>

Why the test fails

The path was changed to /bar.

Fix

Reset the path to /foo.

@vmwclabot
Copy link

@LALAYANG, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@LALAYANG, VMware has approved your signed contributor license agreement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants