Skip to content

Commit 84189a2

Browse files
maokejacksonChew Sern Chiek
andauthored
Let @SingleSession supports meta-present (#447)
Co-authored-by: Chew Sern Chiek <Jackson.CHEW@3ds.com>
1 parent 5ffb53d commit 84189a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/io/github/bonigarcia/seljup/SeleniumJupiter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,9 @@ private boolean isSingleSession(ExtensionContext extensionContext) {
749749
boolean singleSession = false;
750750
Optional<Class<?>> testClass = extensionContext.getTestClass();
751751
if (testClass.isPresent()) {
752-
singleSession = testClass.get()
753-
.isAnnotationPresent(SingleSession.class);
752+
singleSession =
753+
findAnnotation(testClass.get(), SingleSession.class)
754+
.isPresent();
754755
}
755756
log.trace("Single session {}", singleSession);
756757
return singleSession;

0 commit comments

Comments
 (0)