-
Notifications
You must be signed in to change notification settings - Fork 39
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
TST: increase barrier wait time due to travis slowness #346
TST: increase barrier wait time due to travis slowness #346
Conversation
Codecov Report
@@ Coverage Diff @@
## master #346 +/- ##
==========================================
+ Coverage 90.98% 91.21% +0.22%
==========================================
Files 95 95
Lines 15077 15079 +2
==========================================
+ Hits 13718 13754 +36
+ Misses 1359 1325 -34
Continue to review full report at Codecov.
|
90bdab7
to
324e0db
Compare
324e0db
to
229014e
Compare
Reasons for removal: - We have been circumventing this check in an ugly way, flipping the state on command *composition* rather than on send. Might as well just remove it rather than circumvent it. - It's a half-measure, enforcing that we *attempt* registration but not saying anything about whether it worked. - Registration is really a best practice, not a core part of the protocol. - The implementation was a wart, not using the state machine like everything else.
229014e
to
9157f76
Compare
One build passed. Each of the other 3 failed one or more variant of |
1ec1dd7
to
a4b98e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Seems like this should fix the double-sub issue.
cb_id = self._callback_id | ||
self._callback_id += 1 | ||
self.callbacks[cb_id] = ref | ||
return cb_id | ||
|
||
def remove_callback(self, token): | ||
with self._callback_lock: | ||
with self.callback_lock: | ||
self.callbacks.pop(token, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pop
is atomic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you do not want this to fire while something else is iterating over the callbacks etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right.
Example: ``` [W 16:57:53.396 client:1294] Invalid command EventCancelResponse(data_type=<ChannelType.LONG: 5>, sid=1, subscriptionid=1, data_count=0) for Channel <ClientChannel name='f13dcfe9:int' cid=0 sid=1 data_type=5 logger_name='caproto.ch.f13dcfe9:int.0'> in state <ChannelState states={CLIENT: CLOSED, SERVER: CLOSED}> Traceback (most recent call last): File "/home/dallan/Repos/bnl/caproto/caproto/threading/client.py", line 1288, in _process_command self.circuit.process_command(command) File "/home/dallan/Repos/bnl/caproto/caproto/_circuit.py", line 200, in process_command self._process_command(self.their_role, command) File "/home/dallan/Repos/bnl/caproto/caproto/_circuit.py", line 309, in _process_command transitions = chan.process_command(command) File "/home/dallan/Repos/bnl/caproto/caproto/_circuit.py", line 491, in process_command self.states.process_command_type(role, type(command)) File "/home/dallan/Repos/bnl/caproto/caproto/_state.py", line 310, in process_command_type self._fire_command_triggered_transitions(role, command_type) File "/home/dallan/Repos/bnl/caproto/caproto/_state.py", line 288, in _fire_command_triggered_transitions raise err from None caproto._utils.RemoteProtocolError: <ChannelState states={CLIENT: CLOSED, SERVER: CLOSED}> cannot handle command type EventCancelResponse when role=Role.CLIENT and state=States.CLOSED ```
82e0b7d
to
3ca4fad
Compare
Based on what I've seen locally with barrier breakage using 100 to 300+ threads, it seems that the time needed to complete these tests on travis is significantly greater than when run locally. Let's see if this makes multithreaded tests pass more repeatably.