Skip to content

Commit

Permalink
Modify tests to avoid deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
WenzDaniel committed Aug 6, 2021
1 parent 4710419 commit 271e7cf
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 283 deletions.
2 changes: 2 additions & 0 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_run_selection(self):

def test_processing(self):
st = self.st
st.make(self.run_id, 'peaklets')
df = st.get_df(self.run_id, 'event_info')

assert len(df) > 0
Expand All @@ -50,6 +51,7 @@ def test_processing(self):

def test_get_livetime_sec(self):
st = self.st
st.make(self.run_id, 'peaklets')
events = st.get_array(self.run_id, 'peaks')
straxen.get_livetime_sec(st, test_run_id_1T, things=events)

Expand Down
10 changes: 7 additions & 3 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def _run_plugins(st,

# Create event info
target = 'event_info'
# (If we do not split up the processing we always end up in a dead lock)
st.make(run_id=run_id,
targets='peaklets',
**proces_kwargs)
st.make(run_id=run_id,
targets=target,
**proces_kwargs)
Expand Down Expand Up @@ -293,6 +297,6 @@ def test_nT_mutlticore():

# Disable the test below as it saves some time in travis and gives limited new
# information as most development is on nT-plugins.
# def test_1T_mutlticore():
# print('1T multicore')
# test_1T(2)
def test_1T_mutlticore():
print('1T multicore')
test_1T(2)
Loading

0 comments on commit 271e7cf

Please sign in to comment.