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

IT file changes- TestFramework.scala, Runner.scala, RunnerFactory.java #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

@@ -16,6 +16,8 @@ import scala.collection.mutable.ListBuffer
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