Skip to content

Commit

Permalink
test(flaky): fix paramter type assert in testBothAnnotatedConstructor…
Browse files Browse the repository at this point in the history
… test case
  • Loading branch information
varsha-cl committed Sep 30, 2024
1 parent 89de7de commit 050166b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* Tests {@link CachedConstructorAnalyzer}.
Expand Down Expand Up @@ -110,7 +111,8 @@ public void testBothAnnotatedConstructor() {

Constructor<BothAnnotatedConstructor> constructor = analyzer.getConstructor();
assertEquals(1, constructor.getParameterCount());
assertEquals(Integer.class, constructor.getParameterTypes()[0]);
Class<?> parameterType = constructor.getParameterTypes()[0];
assertTrue(parameterType.equals(Integer.class) || parameterType.equals(String.class));
}

@Test
Expand Down

0 comments on commit 050166b

Please sign in to comment.