flatironinstitute / mcmc-monitor

Monitor MCMC runs in the browser
Other
35 stars 0 forks source link

Refactor gui-side webrtc networking code, adding tests. #78

Closed jsoules closed 1 year ago

jsoules commented 1 year ago

This PR presents a few changes to the gui-side webrtc networking code, mainly to facilitate testing.

The following were the significant changes:

Now has 100% test coverage documenting the expected behaviors of the gui-side networking. I've also confirmed via dev run that it still works--console with local service documents communication over the webrtc channel. There may be proper integration tests to add that will check that as well; I've been focused on detailed unit testing.

codecov-commenter commented 1 year ago

Codecov Report

Merging #78 (9b199a4) into main (50d8e8b) will increase coverage by 2.47%. The diff coverage is 95.55%.

@@           Coverage Diff            @@
##            main     #78      +/-   ##
========================================
+ Coverage   7.07%   9.54%   +2.47%     
========================================
  Files         72      74       +2     
  Lines       5652    5677      +25     
  Branches      78     112      +34     
========================================
+ Hits         400     542     +142     
+ Misses      5252    5135     -117     
Flag Coverage Δ
gui_units 12.03% <95.55%> (+3.30%) :arrow_up:
svc_units 2.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/config.ts 0.00% <0.00%> (ø)
src/networking/WebrtcConnectionToService.ts 100.00% <100.00%> (+100.00%) :arrow_up:
src/util/randomAlphaString.ts 100.00% <100.00%> (ø)
src/util/sleepMsec.ts 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

magland commented 1 year ago

Looks good to me.

jsoules commented 1 year ago

Sounds good. I'll get it merged in shortly (currently working on fallback-to-http and I want to hit a stopping point on that first).