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

Clean the test logs #2606

Merged
merged 55 commits into from Feb 22, 2023
Merged

Clean the test logs #2606

merged 55 commits into from Feb 22, 2023

Commits on Jan 30, 2023

  1. Adjust log levels

    Adjust the log levels to:
     - WARN for the pooled directory
     - WARN for the MessageHandlerRegistrar
     - ERROR for the DefaultConfigurer
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    b1ce854 View commit details
    Browse the repository at this point in the history
  2. Mock message sources a bit further

    Whether a TEP or PSEP is fast enough to invoke the openStream method is
    not fixed. Hence, sometimes the tests receive a NullPointerException and
     sometimes they do not. We should make the sources global fields and
     return a mocked BlockingStream.
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    4844723 View commit details
    Browse the repository at this point in the history
  3. Set XStreamSerializer

    Set XStreamSerializer to ensure a safe variant is used.
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    d5a5462 View commit details
    Browse the repository at this point in the history
  4. Resolve warnings

    Resolve warnings
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    596a76c View commit details
    Browse the repository at this point in the history
  5. Set LoggingCallback log level to ERROR

    Set LoggingCallback log level to ERROR
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    6acdc06 View commit details
    Browse the repository at this point in the history
  6. Set duplicate handler resolution to silentOverride

    The test usesDuplicateCommandHandlerResolver() validating duplicate
    handler resolution is taken care off, causes the message to log for all
    other test cases. Hence, the global bus can be configured to not log
    at all.
    
    #enhancement/shorten-build-logs
    smcvb committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    49ec9dd View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. Configuration menu
    Copy the full SHA
    b6eaf5d View commit details
    Browse the repository at this point in the history
  2. Ensure test does not throw exception into the logs

    Ensure test does not throw exception into the logs. To that end, we
    should not interrupt, and adjust the gateway to expect a
    TimeoutException. While touching the file, resolve warnings.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    4e0d104 View commit details
    Browse the repository at this point in the history
  3. Clear test classes of warnings and indentation inconsistencies

    Clear test classes of warnings and indentation inconsistencies
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    81f5f69 View commit details
    Browse the repository at this point in the history
  4. Expand on logger configuration

    Expand on logger configuration to not pollute test and build logs
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    8fe5850 View commit details
    Browse the repository at this point in the history
  5. Align logger configurations

    Align logger configurations, to follow the paradigm of axon-messaging
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    00bbb8a View commit details
    Browse the repository at this point in the history
  6. Slight clean up around the entity manager

    - Rename 'em' to 'entityManager' for clarity
    - Make the EntityManagerFactory a field, to be able to close it after a
    test
    - Adjust the persistence unit name to be very specific for this test
    - Move the properties to the persistence.xml
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    4b08900 View commit details
    Browse the repository at this point in the history
  7. Replace mock message sources for spied EventStores

    Replace the mock StreamableMessageSource and BlockingStream, for an
    actual EventStore using the in-memory EventStorageEngine. For whatever
    reason, the current version of Mockito caused this approach to fail with
     OutOfMemory errors during a Maven test run, and only during a Maven
     test run. As the fact it is a mock or an EmbeddedEventStore instance
     makes no difference for test, we should switch this.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    c5a3d50 View commit details
    Browse the repository at this point in the history
  8. Fine tune logging configuration

    Fine tune logging configuration by setting the GlobalMetricRegistry log
    level to WARN
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    ea43469 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. Add properties to disable AxonServer and the SpringBoot banner

    Add properties to disable AxonServer and the SpringBoot banner
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    dbf53fd View commit details
    Browse the repository at this point in the history
  2. Add log4j2.properties to fine tune test logging

    Add log4j2.properties to fine tune test logging
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    b8ec89d View commit details
    Browse the repository at this point in the history
  3. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the LoggingCallback on ERROR level
    - Adding the AbstractEventStore on ERROR level
    - Adding the AbstractSnapshotter on ERROR level
    - Adding the Test Container specifics on ERROR level
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    acc058a View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the AbstractEventStore on ERROR level
    - Adding the SimpleQueryUpdateEmitter on OFF level
    - Adding the SimpleDeadlineManager on OFF level
    - Adding the axonserver-connector-java on WARN level
    - Adding the JobRunr on WARN level
    - Adding the Test Container on WARN and OFF level
    - Adjust the TrackingEventProcessor from ERROR to OFF
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    809866f View commit details
    Browse the repository at this point in the history
  2. Clarify log line

    Clarify log line to be part of the test case. While touching the file,
    resolve some warnings
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    e71177c View commit details
    Browse the repository at this point in the history
  3. Ignore onErrorDropped default logging hook

    Ignore the onErrorDropped default logging hook, as it does not benefit
    this test case. Be sure to revert this setting after the test runs.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    87bc353 View commit details
    Browse the repository at this point in the history
  4. Rename test class and disable the Axon Server default

    - QueryEventHandlingTest.java is not clear enough. Rename this class to
    ProjectorTest
    - Disable auto-configurer module loading, since that will disable the
    automatic connection of Axon Server and thus clean the logs
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    b55f927 View commit details
    Browse the repository at this point in the history
  5. Set a no-op ListenerInvocationErrorHandler i.o. the LoggingErrorHandler

    Set a no-op ListenerInvocationErrorHandler i.o. the LoggingErrorHandler
    to minimize the amount of logs
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    f58b420 View commit details
    Browse the repository at this point in the history
  6. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the LoggingDuplicateCommandHandlerResolver on ERROR level
    - Adding the Test Container specifics on the levels ERROR and OFF
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    a9b1484 View commit details
    Browse the repository at this point in the history
  7. Remove logger

    Remove the logger, as it was only used during test case construction.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    a888886 View commit details
    Browse the repository at this point in the history
  8. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the ChainingConverter on OFF level
    - Adding the AbstractSnapshotter on ERROR level
    - Adding the SpringAxonAutoConfigurer on ERROR level
    - Adding the SpringBeanParameterResolverFactory on ERROR level
    - Adding mchange-v2 name space on WARN level
    - Add Test Container specific levels to ERROR and OFF
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    1816195 View commit details
    Browse the repository at this point in the history
  9. Clean up persistence layers

    - Replace addressbook for axontext in the JDBC URL
    - Rename the persistence unit to AxonSpringTest
    - Set the persistence unit provider to HibernatePersistenceProvider
    - Set the name of the MyAggregate entity to "myAggregate" as otherwise a
     dollar sign is used to reference the parent and inner class
     combination. Hibernate doesn't like that.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 10, 2023
    Configuration menu
    Copy the full SHA
    28aac10 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Adjust usages of mocked communication services

    - Move PlatformService to the utils packages. This is more inline with
    the desired package structuring.
    - Extract the ContextInterceptor from the StubServer and place under
    utils. This is pre-work to reuse the interceptor.
    - Use the ContextInterceptor in the DummyMessagePlatformServer. This
    ensures we no longer receive NPE on health monitoring messages
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    c7a6275 View commit details
    Browse the repository at this point in the history
  2. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the AbstractEventStore on ERROR level
    - Adding the AbstractAxonServerChannel on WARN level
    - Adding the AxonServerConnectionFactory on ERROR level
    - Adding the ControlChannelImpl on WARN level
    - Adding the CommandChannelImpl on WARN level
    - Adding the HeartbeatMonitor on WARN level
    - Adding the AxonServerManagedChannel on ERROR level
    - Adding the QueryChannelImpl on WARN level
    - Add Test Container specific levels to ERROR and OFF
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    4a35fb6 View commit details
    Browse the repository at this point in the history
  3. Disable Axon Server when it is not needed for the tests

    Disable Axon Server when it is not needed for the tests, as this will
    minimize the logs greatly
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    c5fa6b4 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the pooled package on WARN level
    - Adding the AxonServerConnectionManager on ERROR level
    - Adding the AxonServerConnectionFactory on ERROR level
    - Adding the ControlChannelImpl on WARN level
    - Adding the HeartbeatMonitor on WARN level
    - Adding the AxonServerManagedChannel on WARN level
    - Adding org.axonframework.springboot.autoconfig on WARN level
    - Adding org.axonframework.springboot.util on ERROR level
    - Adding the SagaCustomizeIntegrationTest on WARN level
    - Adding the AnnotationMBeanExporter on WARN level
    - Adding the AnnotationConfigApplicationContext on ERROR level
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    1bd3a31 View commit details
    Browse the repository at this point in the history
  2. Define a stub AxonServer server to use during testing

    Several of the tests require the existence of a connection to what they
    expect to be Axon Server. Although we can set up a test container for
    this, doing so will lengthen the tests quite some. Especially since the
    only required operation to work, is registering a client. Hence, we can
    copy the stub solutions present in the axonserver-connector module, and
    fine tune them for these tests. To not get clashes in port numbers
    between closing server instances, the TcpUtils is also reused, setting a
     system property for the entire test class (and clearing it afterwards).
    While add it, adjust some of the tests to use the
    ApplicationContextRunner approach, streamlining the test cases.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    f8c1ecd View commit details
    Browse the repository at this point in the history
  3. Disable axon server and update test

    For some reason, this test fell through the cracks when configuring them
     with/without axon server. While touching the file, we should also
     revamp the test to use the ApplicationContextRunner solution.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    e8037f3 View commit details
    Browse the repository at this point in the history
  4. Rename the persistence unit

    Rename the persistence unit from "eventStore" to
    "jpaSagaStorePersistenceUnit". Doing so, it's m ore specifically tied to
     this to JpaSagaStoreTest class. Furthermore, it ensures we do not class
     with other persistence units called "eventStore" when AF modules are
     combined.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    11bb773 View commit details
    Browse the repository at this point in the history
  5. Specify the dialect

    Specify the dialect
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    97f02b0 View commit details
    Browse the repository at this point in the history
  6. Switch schema generation from create to drop-and-create

    Switch schema generation from create to drop-and-create. Doing so, we
    ensure tests can always proceed as intended, regardless of pre-existing
    tables.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    aead2ba View commit details
    Browse the repository at this point in the history
  7. Clean up and expand log properties

    - Place spacing and comments for grouping log settings
    - Add a recording appender, aligning with other log settings
    - Add the JpaSequencedDeadLetterQueue on log level WARN
    - Add "SQL dialect" on log level WARN
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    19940df View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Switch logging from default logback to log4j2

    Switch logging from default logback to log4j2. Do so by adding
    spring-boot-starter-log4j2 and by excluding the default
    spring-boot-starter-logger from all starter dependencies.
    While touching the pom.xml, add properties, order the dependencies, and
    group the dependencies.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    4aa283b View commit details
    Browse the repository at this point in the history
  2. Disable Axon Server in tests to eliminate unnecessary logging

    Disable Axon Server in tests to eliminate unnecessary logging
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    96c42f3 View commit details
    Browse the repository at this point in the history
  3. Remove logger used for test validation

    Remove logger used for test validation
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    c96f83f View commit details
    Browse the repository at this point in the history
  4. Define a stub AxonServer server to use during testing

    Several of the tests require the existence of a connection to what they
    expect to be Axon Server. Although we can set up a test container for
    this, doing so will lengthen the tests quite some. Especially since the
    only required operation to work, is registering a client. Hence, we can
    copy the stub solutions present in the axonserver-connector module, and
    fine tune them for these tests. To not get clashes in port numbers
    between closing server instances, the TcpUtils is also reused, setting a
    system property for the entire test class (and clearing it afterwards).
    While add it, adjust some of the tests to use the
    ApplicationContextRunner approach, streamlining the test cases.
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    84f12c9 View commit details
    Browse the repository at this point in the history
  5. Fine tune logging configuration

    Fine tune logging configuration by:
    - Adding the DefaultCommandGateway on ERROR level
    - Adding the AbstractEventStore on ERROR level
    - Adding the pooled package on WARN level
    - Adding the DeadLetteredEventProcessingTask on ERROR level
    - Adding the org.axonframework.messaging.deadletter on WARN level
    - Adding the org.axonframework.eventhandling.deadletter on WARN level
    - Adding AxonServerConnectionManager on ERROR level
    - Adding AxonServerConnectionFactory on WARN level
    - Adding ControlChannelImpl on WARN level
    - Adding HeartbeatMonitor on WARN level
    - Adding AxonServerManagedChannel on WARN level
    - Adding org.axonframework.springboot.autoconfig on WARN level
    - Adding org.axonframework.springboot.util on ERROR level
    - Adding the SagaCustomizeIntegrationTest on WARN level
    - Adding the SagaCustomizeIntegrationTest on WARN level
    - Adding the TrackingEventProcessorIntegrationTest on WARN level
    - Adding the com.zaxxer.hikari package on WARN level
    - Adding the "SQL dialect" on WARN level
    - Adding the org.springframework.data package on WARN level
    - Add Test Container specific levels to ERROR and OFF
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    1b6c3b7 View commit details
    Browse the repository at this point in the history
  6. Fine tune logging configuration

    Fine tune logging configuration by adding the AnnotationMBeanExporter on
     WARN level
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    5fdabcd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4a52e1d View commit details
    Browse the repository at this point in the history
  8. Fine tune logging configuration

    Fine tune logging configuration by adding the JdbcSagaStore on ERROR
    level
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    99118fc View commit details
    Browse the repository at this point in the history
  9. Fine tune logging configuration

    Fine tune logging configuration by adding the DeepEqualsMatcher on ERROR
     level
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    9acc5be View commit details
    Browse the repository at this point in the history
  10. Remove stack trace printing

    Remove stack trace printing
    
    #enhancement/shorten-build-logs
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    8fdf903 View commit details
    Browse the repository at this point in the history
  11. Fix all jdbc urls to axontest i.o. addressbook

    Fix all jdbc urls to axontest i.o. addressbook
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    c65ef1c View commit details
    Browse the repository at this point in the history
  12. Move test specific log settings to the bottom

    Move test specific log settings to the bottom
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    df0248f View commit details
    Browse the repository at this point in the history
  13. Better specify log configuration for AF SpringBoot

    Better specify log configuration for AF SpringBoot
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    c140cdf View commit details
    Browse the repository at this point in the history
  14. Rename persistence unit to something test specific

    Rename persistence unit to something test specific
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    3b06856 View commit details
    Browse the repository at this point in the history
  15. Remove disabled annotation from tests

    Remove disabled annotation from tests
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    6bf4396 View commit details
    Browse the repository at this point in the history
  16. Drop usage of old Sping xml config

    Drop usage of old Sping xml config. The axon-messaging/db-context.xml
    still anticipated a persistence unit name of "eventStore". Although we
    can fix the xml I think it's smarter to move to the annotation based
    configuration.
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    2c5a554 View commit details
    Browse the repository at this point in the history
  17. Switch JDBC URL to point to axontest i.o. address-book

    Switch JDBC URL to point to axontest i.o. address-book
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    2c8a2f8 View commit details
    Browse the repository at this point in the history
  18. Switch persistence unit name to "AxonSpringTest" i.o. ""eventStore"

    Switch persistence unit name to "AxonSpringTest" i.o. ""eventStore"
    
    #2606
    smcvb committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    864270c View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Switch persistence unit name to "integrationtest" i.o. ""eventStore"

    Switch persistence unit name to "integrationtest" i.o. ""eventStore"
    
    #2606
    smcvb committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    c0aef60 View commit details
    Browse the repository at this point in the history