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

Use Gradle plugin to build protocol tests #263

Merged
merged 2 commits into from
Jan 27, 2020
Merged

Conversation

mtdowling
Copy link
Member

@mtdowling mtdowling commented Jan 19, 2020

Make various improvements geared towards Gradle/CLI

AWS protocol tests:

  • Use the Gradle plugin to build the AWS protocol tests.

SmithyBuild:

  • Only run parallel projections if there's more than one.

SmithyCli (breaking CLI changes):

  • to allow the writing to stderr and stdout to be completely customized
    using a Consumer. This allows the Gradle plugin to log writes
    to stdout rather than rely on the non-thread-safe default behavior of
    intercepting calls.
  • Colors nows is used by calling out and err directly on an enum variant
    rather than a static method.
  • Adding the --logging parameter to every command and removed the static
    configureLogging method.
  • Adding stdout and stderr methods to the Cli. These are now called
    by Colors when writing.
  • Enabling disabling ANSI colors is done on Cli and not on Colors now.
    All of the methods used to influence the CLI globally is now all on
    the Cli.
  • Logging is only configured when a logging option is passed in. A
    custom logger is used that makes calls to the intercepted stderr
    method.
  • Running build now shows validation results too.

SmithyModel:

  • ValidationEvents are now sorted by filename, line number, column,
    severity, shape ID, message, then finally the event ID.
  • Introducing the ValidationEventFormatter interface. There are
    now implementations of the current display (showing the event on
    a single line like CheckStyle), and a contextual formatter that
    shows the line of the source file that has the error.

@mtdowling mtdowling changed the title [WIP] Use Gradle plugin to build protocol tests Use Gradle plugin to build protocol tests Jan 22, 2020
@mtdowling
Copy link
Member Author

Note that this depends on the Gradle plugin being released first.

AWS protocol tests:
- Use the Gradle plugin to build the AWS protocol tests.

SmithyBuild:
- Only run parallel projections if there's more than one.

SmithyCli (breaking CLI changes):
- to allow the writing to stderr and stdout to be completely customized
  using a Consumer<String>. This allows the Gradle plugin to log writes
  to stdout rather than rely on the non-thread-safe default behavior of
  intercepting calls.
- Colors nows is used by calling out and err directly on an enum variant
  rather than a static method.
- Adding the --logging parameter to every command and removed the static
  `configureLogging` method.
- Adding `stdout` and `stderr` methods to the Cli. These are now called
  by Colors when writing.
- Enabling disabling ANSI colors is done on Cli and not on Colors now.
  All of the methods used to influence the CLI globally is now all on
  the Cli.
- Logging is only configured when a logging option is passed in. A
  custom logger is used that makes calls to the intercepted stderr
  method.
- Running `build` now shows validation results too.

SmithyModel:
- ValidationEvents are now sorted by filename, line number, column,
  severity, shape ID, message, then finally the event ID.
- Introducing the ValidationEventFormatter interface. There are
  now implementations of the current display (showing the event on
  a single line like CheckStyle), and a contextual formatter that
  shows the line of the source file that has the error.
@mtdowling
Copy link
Member Author

This has been updated to use 0.4.3 of the Gradle plugin

This commit updates SmithyTestSuite to support easily running test
suites as JUnit 5 ParameterizedTests. This allows JUnit to control how
tests are executed and provides better error reporting. Tests seem to
execute more or less in the same amount of time as before.
@mtdowling mtdowling merged commit 7a5f415 into master Jan 27, 2020
@mtdowling mtdowling deleted the use-gradle-plugin branch February 5, 2020 18:08
@kstich kstich mentioned this pull request Mar 26, 2020
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.

3 participants