Skip to content

Adding tests and GH Actions CI#12

Open
cergfix wants to merge 12 commits intoHappyr:masterfrom
cergfix:feat/adding-tests
Open

Adding tests and GH Actions CI#12
cergfix wants to merge 12 commits intoHappyr:masterfrom
cergfix:feat/adding-tests

Conversation

@cergfix
Copy link

@cergfix cergfix commented Mar 2, 2026

Summary

Add CI/CD pipeline, comprehensive test suite (97 tests, 91% line coverage), and Checkstyle linting. Replaces the defunct Travis CI config and manual integration test. Documents 3 known bugs in FCGIConnection scatter read / STDERR handling with failing tests.

Changes

  • Upgraded from JUnit 3.8.1 to JUnit 5 (5.10.2) in pom.xml, added maven-compiler-plugin, maven-surefire-plugin, JaCoCo, and Checkstyle
  • Deleted .travis.yml and manual Test.java integration test
  • Added GitHub Actions CI (.github/workflows/ci.yml): Checkstyle on Java 17, test matrix on Java 8/11/17/25
  • Added checkstyle.xml with practical rules (imports, naming, coding patterns, brace style)
  • Added PR template (.github/pull_request_template.md)
  • Added 97 unit/integration tests across 11 test files:
  • Enum constants (FCGIHeaderType, FCGIProtocolStatus, FCGIRole)
  • Messages (FCGIHeader, FCGIBeginRequest, FCGIEndRequest, FCGIParams, FCGIStdin)
  • Utilities (IoUtils) and exceptions (FCGIException)
  • FCGIConnectionTest with mock FCGI server: issue Truncated responses #6 regression (truncated responses), issue php5-fpm: Connection reset by peer (read) #7 regression (STDERR handling), write path, error guards, exception paths
  • Documented 3 known bugs in README with links to source lines and failing tests:
    • Scatter read doesn't handle STDERR frames
    • STDERR-first breaks response header parsing
    • Scatter read drops non-STDOUT frames without consuming body

Test plan

  • mvn verify passes locally (94 pass, 3 expected failures for known bugs)
  • mvn checkstyle:check passes with 0 violations
  • Known bug tests verified to fail correctly
  • CI runs on GitHub Actions after push

@cergfix
Copy link
Author

cergfix commented Mar 2, 2026

Fixes #11

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.

1 participant