pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
288 stars 124 forks source link

protocols: improve timeout handling for vxi11 #287

Closed MatthieuDartiailh closed 4 years ago

MatthieuDartiailh commented 4 years ago

Based on last comments in https://github.com/pyvisa/pyvisa/issues/367

codecov-io commented 4 years ago

Codecov Report

Merging #287 (d198fdf) into master (8a8573e) will decrease coverage by 16.88%. The diff coverage is 32.35%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #287       +/-   ##
===========================================
- Coverage   38.76%   21.88%   -16.89%     
===========================================
  Files          18       18               
  Lines        2551     2577       +26     
  Branches      342      344        +2     
===========================================
- Hits          989      564      -425     
- Misses       1505     2005      +500     
+ Partials       57        8       -49     
Flag Coverage Δ
unittest ?
unittests 21.88% <32.35%> (+0.20%) :arrow_up:

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

Impacted Files Coverage Δ
pyvisa_py/protocols/vxi11.py 43.14% <11.11%> (-33.94%) :arrow_down:
...te/keysight_assisted_tests/test_tcpip_resources.py 82.92% <30.00%> (-17.08%) :arrow_down:
pyvisa_py/protocols/rpc.py 23.75% <46.66%> (-21.09%) :arrow_down:
pyvisa_py/tcpip.py 18.88% <0.00%> (-50.38%) :arrow_down:
pyvisa_py/sessions.py 40.50% <0.00%> (-26.50%) :arrow_down:
pyvisa_py/highlevel.py 43.93% <0.00%> (-26.02%) :arrow_down:
pyvisa_py/common.py 75.00% <0.00%> (-8.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8a8573e...d198fdf. Read the comment docs.

MatthieuDartiailh commented 4 years ago

This does not seem to be the right solution. Testing against a Keysight system I discovered that I did get the expected answer but later than expected so either the timeout is improperly set for those systems or something or we need a tolerance around how long we wait for an answer. I won't have time to look into it soon but I will definitively come back to this.