Skip to content

[P1] Create integration test suite #313

@sfloess

Description

@sfloess

Problem

Project has unit tests but no integration tests to verify component interaction.

Impact

  • Severity: MEDIUM
  • Category: Quality/Reliability
  • Cannot verify end-to-end scenarios
  • May miss integration bugs
  • Lower confidence in releases

Missing Test Scenarios

Core Integration Tests

  1. Application Lifecycle:

    • Deploy → Start → Stop → Undeploy (full cycle)
    • Deploy multiple apps with dependencies
    • Hot reload with state preservation
  2. Resource Enforcement:

    • Application exceeds CPU quota → SHUTDOWN action
    • Application exceeds heap quota → enforcement
    • Multiple apps competing for resources
  3. Messaging:

    • App A publishes, App B receives
    • Service registry across apps
    • Message ordering guarantees
  4. REST API:

    • Deploy via API, verify running
    • Start/stop via API
    • Concurrent API requests
  5. ClassLoader Isolation:

    • Two apps with conflicting dependencies
    • ClassLoader cleanup on undeploy (no memory leaks)

Recommended Framework

Use Testcontainers for isolated integration tests:

@Testcontainers
class ApplicationLifecycleIT {
    @Container
    static GenericContainer<?> platform = new GenericContainer<>("platform-java:latest");
    
    @Test
    void shouldDeployAndStartApplication() {
        // Test here
    }
}

Module Structure

Create new module:

jplatform-integration-tests/
├── pom.xml
└── src/test/java/
    └── org/flossware/jplatform/it/
        ├── ApplicationLifecycleIT.java
        ├── ResourceEnforcementIT.java
        └── MessagingIT.java

Priority

P1 - High - Should be created for v1.2 release.

CI/CD Integration

Run integration tests in separate workflow:

name: Integration Tests
on: [push, pull_request]
jobs:
  integration-tests:
    runs-on: ubuntu-latest
    steps:
      - run: mvn verify -Pintegration-tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions