Skip to content

Add comprehensive test suite and fix critical bugs#3

Open
lixen-wg2 wants to merge 2 commits intosebastiw:mainfrom
lixen-wg2:main
Open

Add comprehensive test suite and fix critical bugs#3
lixen-wg2 wants to merge 2 commits intosebastiw:mainfrom
lixen-wg2:main

Conversation

@lixen-wg2
Copy link
Copy Markdown

  • Add 7 new EUnit test cases covering all requested scenarios:

    • client connect (unsuccessful) to non-existing server
    • client connect (successfully) to existing server
    • second client connect (successfully) to same server
    • client send data message to server
    • server send data message to client
    • server exits
    • clients retry
  • Fix critical bugs in codebase:

    • sock_path.erl:27 - Fix incorrect gen_server:start_link call
    • sock_assoc.erl:55 - Fix inconsistent map key usage (path vs paths)
    • sock_assoc.erl:64 - Fix map key access in get_paths function
  • Improve test infrastructure:

    • Replace timer:sleep with recursive checking for reliability
    • Add helper functions for condition waiting
    • Fix old broken connect_accept_1_test
    • Add proper setup/teardown for application lifecycle
  • Create sock_proper_tests.erl with 8 comprehensive properties testing:

    • Endpoint creation with valid/invalid ports
    • Association creation and lifecycle management
    • Port collision detection
    • Concurrent connection handling
    • Endpoint options and configuration
  • Integrate PropEr tests into existing EUnit test suite

  • Add detailed README_PROPER.md documenting all test properties and usage

  • Tests cover edge cases and provide extensive input space coverage

- Add 7 new EUnit test cases covering all requested scenarios:
  * client connect (unsuccessful) to non-existing server
  * client connect (successfully) to existing server
  * second client connect (successfully) to same server
  * client send data message to server
  * server send data message to client
  * server exits
  * clients retry

- Fix critical bugs in codebase:
  * sock_path.erl:27 - Fix incorrect gen_server:start_link call
  * sock_assoc.erl:55 - Fix inconsistent map key usage (path vs paths)
  * sock_assoc.erl:64 - Fix map key access in get_paths function

- Improve test infrastructure:
  * Replace timer:sleep with recursive checking for reliability
  * Add helper functions for condition waiting
  * Fix old broken connect_accept_1_test
  * Add proper setup/teardown for application lifecycle

- All 28 tests now pass with comprehensive coverage of connection management
- Add PropEr dependency and eunit_formatters to test profile in rebar.config
- Create sock_proper_tests.erl with 8 comprehensive properties testing:
  * Endpoint creation with valid/invalid ports
  * Association creation and lifecycle management
  * Port collision detection
  * Concurrent connection handling
  * Endpoint options and configuration
- Integrate PropEr tests into existing EUnit test suite
- Add detailed README_PROPER.md documenting all test properties and usage
- Tests cover edge cases and provide extensive input space coverage
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