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

Honor TestArgs TestRenderer throughout zio-test machinery #7647

Merged

Conversation

swoogles
Copy link
Contributor

We had some hard-coded ConsoleRenderer references that are now proper TestRenderer parameters.

This should resolve #7241 by giving users the ability to specify which TestRenderer to use.

Unrelated - Fixed timing of tests for the XML test reports.

val sharedSinkLayer = sinkLayer(console, ConsoleEventRenderer)
val testArgs = TestArgs.parse(args)

renderer = testArgs.testRenderer // Ensures summary is pretty in same style as rest of the test output
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hmemcpy I think this obviates the need for TestArgs.printSummary, at least for some cases.

@@ -74,19 +73,13 @@ abstract class ZIOSpecAbstract extends ZIOApp with ZIOSpecAbstractVersionSpecifi
testArgs = TestArgs.parse(args.getArgs.toArray)
summary <- runSpecAsApp(spec, testArgs, console)
_ <- ZIO.when(testArgs.printSummary) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hmemcpy I think we can remove this guard now, since we're always going to use the correct TestRenderer, and the IntellijTestRenderer will just be an empty string.

Copy link
Contributor

@hmemcpy hmemcpy left a comment

Choose a reason for hiding this comment

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

LGTM!

@adamgfraser adamgfraser merged commit a776f93 into zio:series/2.x Dec 20, 2022
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.

[zio-test-sbt] Use IntelliJRenderer when running sbt test inside Teamcity
3 participants