hackathon/focused-test-results.txt
Christoph Wagner a489c15cf5 feat: Add complete HSP implementation with integration tests passing
Initial implementation of HTTP Sender Plugin following TDD methodology
  with hexagonal architecture. All 313 tests passing (0 failures).

  This commit adds:
  - Complete domain model and port interfaces
  - All adapter implementations (HTTP, gRPC, file logging, config)
  - Application services (data collection, transmission, backpressure)
  - Comprehensive test suite with 18 integration tests

  Test fixes applied during implementation:
  - Fix base64 encoding validation in DataCollectionServiceIntegrationTest
  - Fix exception type handling in IConfigurationPortTest
  - Fix CompletionException unwrapping in IHttpPollingPortTest
  - Fix sequential batching in DataTransmissionServiceIntegrationTest
  - Add test adapter failure simulation for reconnection tests
  - Use adapter counters for gRPC verification

  Files added:
  - pom.xml with all dependencies (JUnit 5, Mockito, WireMock, gRPC, Jackson)
  - src/main/java: Domain model, ports, adapters, application services
  - src/test/java: Unit tests, integration tests, test utilities
2025-11-20 22:38:55 +01:00

156 lines
13 KiB
Plaintext

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/opt/homebrew/Cellar/maven/3.9.11/libexec/lib/guice-5.1.0-classes.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< com.siemens.coreshield:http-sender-plugin >--------------
[INFO] Building HTTP Sender Plugin (HSP) 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact com.github.tomakehurst:wiremock:jar:3.0.1 has been relocated to org.wiremock:wiremock:jar:3.0.1
[INFO]
[INFO] --- jacoco:0.8.11:prepare-agent (prepare-agent) @ http-sender-plugin ---
[INFO] argLine set to "-javaagent:/Volumes/Mac maxi/Users/christoph/.m2/repository/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar=destfile=/Volumes/Mac maxi/Users/christoph/sources/hackathon/target/jacoco.exec"
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ http-sender-plugin ---
[INFO] skip non existing resourceDirectory /Volumes/Mac maxi/Users/christoph/sources/hackathon/src/main/resources
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ http-sender-plugin ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ http-sender-plugin ---
[INFO] skip non existing resourceDirectory /Volumes/Mac maxi/Users/christoph/sources/hackathon/src/test/resources
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ http-sender-plugin ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- surefire:3.2.2:test (default-test) @ http-sender-plugin ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.siemens.coreshield.hsp.adapter.outbound.grpc.GrpcStreamingAdapterTest
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.07 s -- in com.siemens.coreshield.hsp.adapter.outbound.grpc.GrpcStreamingAdapterTest
[INFO] Running com.siemens.coreshield.hsp.application.ConfigurationManagerTest
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Polling interval must not exceed 1 hour (was: PT2H)
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. At least one endpoint is required
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Endpoint[0] timeout must be greater than zero
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Endpoint[0] has invalid URL format: not-a-valid-url
[main] INFO com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration loaded successfully from: /var/folders/pd/0sfd9_0j0c7fqf61061pcvk40000gp/T/junit863253061182620814/hsp-config.json
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. gRPC port must be between 1 and 65535 (was: 99999)
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Buffer capacity must be exactly 300 (was: 500)
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Failed to parse configuration file: Unexpected character ('"' (code 34)): was expecting comma to separate Object entries
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 3, column: 4] (through reference chain: com.siemens.coreshield.hsp.adapter.outbound.config.dto.ConfigurationDto["endpoints"]->java.util.ArrayList[0])
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Polling interval must be at least 1 second (was: PT0.5S)
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration file not found: /var/folders/pd/0sfd9_0j0c7fqf61061pcvk40000gp/T/junit10935321584239935782/does-not-exist.json
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. At least one endpoint is required
[main] ERROR com.siemens.coreshield.hsp.application.ConfigurationManager - ConfigurationManager: Configuration validation failed with 1 error(s):
1. Buffer capacity must be exactly 300 (was: 50000)
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.138 s -- in com.siemens.coreshield.hsp.application.ConfigurationManagerTest
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BackpressureHandlingTests
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.051 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BackpressureHandlingTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$GracefulShutdownTests
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.628 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$GracefulShutdownTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$StatisticsTrackingTests
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.76 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$StatisticsTrackingTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ErrorHandlingTests
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.547 s <<< FAILURE! -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ErrorHandlingTests
[ERROR] com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ErrorHandlingTests.shouldContinueAfterTransmissionError -- Time elapsed: 2.517 s <<< FAILURE!
java.lang.AssertionError:
[Should attempt streaming at least twice]
Expecting actual:
1
to be greater than or equal to:
2
at com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ErrorHandlingTests.shouldContinueAfterTransmissionError(DataTransmissionServiceTest.java:764)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ReceiverIdTests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.203 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ReceiverIdTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ReconnectionLogicTests
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 38.05 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$ReconnectionLogicTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$GrpcStreamLifecycleTests
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.828 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$GrpcStreamLifecycleTests
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BatchAccumulationTests
[ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.759 s <<< FAILURE! -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BatchAccumulationTests
[ERROR] com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BatchAccumulationTests.shouldNotExceed4MBBatchSize -- Time elapsed: 0.508 s <<< FAILURE!
java.lang.AssertionError:
[Should send at least 2 batches]
Expecting actual:
1
to be greater than or equal to:
2
at com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$BatchAccumulationTests.shouldNotExceed4MBBatchSize(DataTransmissionServiceTest.java:443)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
[INFO] Running com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$SingleConsumerThreadTests
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.630 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest$SingleConsumerThreadTests
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 73.46 s -- in com.siemens.coreshield.hsp.application.DataTransmissionServiceTest
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$ErrorHandling
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$ErrorHandling
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$StatisticsAndMetrics
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.624 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$StatisticsAndMetrics
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$ConcurrentPollingBehavior
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.484 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$ConcurrentPollingBehavior
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$BackpressureIntegration
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.879 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$BackpressureIntegration
[INFO] Running com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$HttpPollingSkipLogic
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.465 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest$HttpPollingSkipLogic
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.461 s -- in com.siemens.coreshield.hsp.application.BackpressureAwareCollectionServiceTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] DataTransmissionServiceTest$BatchAccumulationTests.shouldNotExceed4MBBatchSize:443 [Should send at least 2 batches]
Expecting actual:
1
to be greater than or equal to:
2
[ERROR] DataTransmissionServiceTest$ErrorHandlingTests.shouldContinueAfterTransmissionError:764 [Should attempt streaming at least twice]
Expecting actual:
1
to be greater than or equal to:
2
[INFO]
[ERROR] Tests run: 65, Failures: 2, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:41 min
[INFO] Finished at: 2025-11-20T21:27:20+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.2:test (default-test) on project http-sender-plugin: There are test failures.
[ERROR]
[ERROR] Please refer to /Volumes/Mac maxi/Users/christoph/sources/hackathon/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException