Skip to content

Conversation

@suzzy777
Copy link

No description provided.

loader.loadClass(methodAnnotationStr).asInstanceOf[Class[_ <: Annotation]]

try {

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove most empty lines please

val classFilePath = clz.getProtectionDomain.getCodeSource.getLocation.getPath
val isIntegrationTestByDirectory = classFilePath.contains("/target/test-classes/")

Logger.getGlobal().log(Level.INFO, s"Class $clzName integration test by name: $isIntegrationTestByName")
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of adding debug messages to INFO logging, please change the level to DEBUG or something equivalent.


val isIntegrationTestByName = clzName.endsWith("IT")
val classFilePath = clz.getProtectionDomain.getCodeSource.getLocation.getPath
val isIntegrationTestByDirectory = classFilePath.contains("/target/test-classes/")
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there other places in testrunner that hard codes paths? Looking specifically in /target/test-classes/ may be best to be hard coded with other paths in testrunner

Logger.getGlobal().log(Level.INFO, s"Class $clzName integration test by name: $isIntegrationTestByName")
Logger.getGlobal().log(Level.INFO, s"Class $clzName integration test by directory: $isIntegrationTestByDirectory")

Try(if (methods.exists(_.getAnnotation(annotation) != null) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Should Try be try?


}

if (clz.getAnnotation(disabledAnnotation) != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be removed?

.asInstanceOf[Class[_ <: Annotation]]
if (Modifier.isStatic(clz.getModifiers) ||
clz.getAnnotation(nestedAnnotation) == null) {
// a nested test class should
Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep these comments

import scala.io.Source
import scala.util.{Failure, Try}

import java.util.logging.{Level, Logger}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong line. put inbetween line 4-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants