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

Addressed various initialization issues and patterns #143

Merged
merged 7 commits into from
Jul 8, 2024

Conversation

thehenrytsai
Copy link
Collaborator

@thehenrytsai thehenrytsai commented Jul 5, 2024

There are more to be done, but this is a good start.

  • Fixed confusing patterns of existing async method take callbacks, and yet return immediately without invoking and awaiting
    on the callback.
  • Introduced DwnServer.stop() for clarity and consistency.
  • Introduced HttpApi.close() for clarity and consistency.
  • Added missing removeProcessHandlers as counterpart to setProcessHandlers for proper clean up.
  • Added didResolver to DwnServerOptions for overriding DID Resolver cache LevelDB implementation in tests to prevent DB locking issues.
  • Used Poller to make some tests more stable.

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 96.87500% with 5 lines in your changes missing coverage. Please review.

Project coverage is 95.64%. Comparing base (704cbb4) to head (6470a54).

Files Patch % Lines
src/dwn-server.ts 96.15% 3 Missing ⚠️
src/http-api.ts 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   94.77%   95.64%   +0.86%     
==========================================
  Files          27       27              
  Lines        2756     2869     +113     
  Branches      353      374      +21     
==========================================
+ Hits         2612     2744     +132     
+ Misses        143      124      -19     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thehenrytsai thehenrytsai marked this pull request as ready for review July 6, 2024 01:08
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇 WOW! Really went above and beyond for this one! Excellent clean up!

@thehenrytsai thehenrytsai merged commit 24199fa into main Jul 8, 2024
8 checks passed
@thehenrytsai thehenrytsai deleted the henrytsai/init-refactor branch July 8, 2024 18:30
bnonni pushed a commit to FormFree/dwn-server that referenced this pull request Aug 7, 2024
…dentity#143)

There are more to be done, but this is a good start.

- Fixed confusing patterns of existing async method take callbacks, and yet return immediately without invoking and awaiting on the callback.
- Introduced  `DwnServer.stop()` for clarity and consistency.
- Introduced  `HttpApi.close()` for clarity and consistency.
- Added missing `removeProcessHandlers` as counterpart to
`setProcessHandlers` for proper clean up.
- Added `didResolver` to `DwnServerOptions` for overriding DID Resolver cache LevelDB implementation in tests to prevent DB locking issues.
- Used Poller to make some tests more stable.
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.

3 participants