Skip to content

Commit

Permalink
Work around for ska-sa/spead2#40
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Mar 6, 2019
1 parent f57c28c commit a57fc11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions katsdpcal/test/test_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ def setUp(self):
# heaps are received in a predictable order and not affected by timing.
endpoints_per_server = self.n_endpoints // self.n_servers
for i, endpoint in enumerate(self.l0_endpoints):
# Compute first endpoint index of the server
base = i // endpoints_per_server * endpoints_per_server
# Compute last endpoint index of the server. We use the last
# rather than the first as a quick workaround for
# https://github.com/ska-sa/spead2/issues/40
base = (i // endpoints_per_server + 1) * endpoints_per_server - 1
queue = self.l0_queues[self.l0_endpoints[base]]
stream = spead2.send.InprocStream(sender_thread_pool, queue)
stream.set_cnt_sequence(i, self.n_endpoints)
Expand Down

0 comments on commit a57fc11

Please sign in to comment.