Skip to content
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

Fix broken tests #157

Closed
annawoodard opened this Issue Mar 22, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@annawoodard
Copy link
Collaborator

annawoodard commented Mar 22, 2018

@yadudoc this looks related to #151?

======================================================================
ERROR: Test checkpointing with task_periodic behavior
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/Parsl/parsl/parsl/tests/test_checkpointing/test_periodic.py", line 69, in test_periodic
    assert int(deltas[1] - deltas[0]) == 5, "Delta between checkpoints exceeded period "
IndexError: list index out of range
@yadudoc

This comment has been minimized.

Copy link
Member

yadudoc commented Mar 22, 2018

Do you see this on travis ? Or running locally ?

@annawoodard

This comment has been minimized.

Copy link
Collaborator Author

annawoodard commented Mar 22, 2018

Here is full output for running locally:

(parsl_py36) [midway001] ~/parsl/parsl/tests >nosetests -xv test_checkpointing.test_periodic
Test checkpointing with task_periodic behavior ... ERROR

======================================================================
ERROR: Test checkpointing with task_periodic behavior
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/annawoodard/.conda/envs/parsl_py36/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/annawoodard/parsl/parsl/tests/test_checkpointing/test_periodic.py", line 69, in test_periodic
    assert int(deltas[1] - deltas[0]) == 5, "Delta between checkpoints exceeded period "
IndexError: list index out of range
-------------------- >> begin captured stdout << ---------------------
Launching :  4
Done launching
Done sleeping
Rundir :  /home/annawoodard/parsl/parsl/tests/runinfo/114

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
parsl.dataflow.rundirs: DEBUG: Parsl run initializing in rundir:./runinfo/114
parsl.dataflow.dflow: INFO: Parsl version: 0.4.1
parsl.dataflow.dflow: INFO: Libsubmit version: 0.3.2
parsl.dataflow.config_defaults: DEBUG: { 'controller': {'mode': 'auto'},
  'globals': { 'appCache': True,
               'checkpoint': None,
               'checkpointFiles': None,
               'checkpointMode': 'periodic',
               'checkpointPeriod': '00:00:05',
               'lazyErrors': True,
               'memoize': True,
               'strategy': 'simple',
               'usageTracking': True},
  'sites': [ { 'auth': {'channel': None},
               'execution': { 'block': { 'initBlocks': 0,
                                         'maxBlocks': 10,
                                         'minBlocks': 0,
                                         'nodes': 1,
                                         'options': {},
                                         'parallelism': 0.75,
                                         'taskBlocks': 1,
                                         'walltime': '00:20:00'},
                              'executor': 'threads',
                              'maxThreads': 2,
                              'provider': None,
                              'scriptDir': '/home/annawoodard/parsl/parsl/tests/runinfo/114'},
               'site': 'Local_Threads'}]}
parsl.dataflow.usage_tracking.usage: DEBUG: Tracking status: True
parsl.dataflow.usage_tracking.usage: DEBUG: Testing mode   : True
parsl.dataflow.memoization: INFO: App caching initialized
parsl.execution_provider.provider_factory: DEBUG: Constructing site : Local_Threads
parsl.execution_provider.provider_factory: DEBUG: Created channel : None
parsl.execution_provider.provider_factory: DEBUG: Created execution_provider : None
parsl.execution_provider.provider_factory: DEBUG: Created executor : <parsl.executors.threads.ThreadPoolExecutor object at 0x7f1245922fd0>
parsl.dataflow.strategy: DEBUG: Scaling strategy: simple
parsl.dataflow.dflow: DEBUG: Using executors: {'Local_Threads': <parsl.executors.threads.ThreadPoolExecutor object at 0x7f1245922fd0>}
parsl.dataflow.dflow: INFO: Task 0 submitted for App slow_double, waiting on tasks []
parsl.dataflow.dflow: INFO: Task 0 launched on site Local_Threads
parsl.dataflow.dflow: DEBUG: Task 0 launched with AppFut:<AppFuture at 0x7f12459366d8 state=running>
parsl.dataflow.dflow: INFO: Task 1 submitted for App slow_double, waiting on tasks []
parsl.dataflow.dflow: INFO: Task 1 launched on site Local_Threads
parsl.dataflow.dflow: DEBUG: Task 1 launched with AppFut:<AppFuture at 0x7f1245936978 state=running>
parsl.dataflow.dflow: INFO: Task 2 submitted for App slow_double, waiting on tasks []
parsl.dataflow.dflow: INFO: Task 2 launched on site Local_Threads
parsl.dataflow.dflow: DEBUG: Task 2 launched with AppFut:<AppFuture at 0x7f1245936ba8 state=pending>
parsl.dataflow.dflow: INFO: Task 3 submitted for App slow_double, waiting on tasks []
parsl.dataflow.dflow: INFO: Task 3 launched on site Local_Threads
parsl.dataflow.dflow: DEBUG: Task 3 launched with AppFut:<AppFuture at 0x7f1245936dd8 state=pending>
parsl.dataflow.strategy: DEBUG: Site:Local_Threads Status:STATIC
parsl.dataflow.dflow: INFO: Checkpointing..
parsl.dataflow.dflow: WARNING: No tasks checkpointed, please ensure caching is enabled
parsl.dataflow.dflow: INFO: Task 0 completed
parsl.dataflow.dflow: INFO: Task 1 completed
parsl.dataflow.dflow: INFO: Task 2 completed
parsl.dataflow.dflow: INFO: Task 3 completed
parsl.dataflow.strategy: DEBUG: Site:Local_Threads Status:STATIC
parsl.dataflow.dflow: INFO: Checkpointing..
parsl.dataflow.dflow: DEBUG: Task 0 checkpointed
parsl.dataflow.dflow: DEBUG: Task 1 checkpointed
parsl.dataflow.dflow: DEBUG: Task 2 checkpointed
parsl.dataflow.dflow: DEBUG: Task 3 checkpointed
parsl.dataflow.dflow: INFO: Done checkpointing 4 tasks
parsl.dataflow.strategy: DEBUG: Site:Local_Threads Status:STATIC
parsl.dataflow.dflow: INFO: Checkpointing..
parsl.dataflow.dflow: DEBUG: No tasks checkpointed
parsl.dataflow.dflow: INFO: DFK cleanup initiated
parsl.dataflow.dflow: INFO: Checkpointing..
parsl.dataflow.dflow: DEBUG: No tasks checkpointed
parsl.dataflow.dflow: INFO: Stopping checkpoint timer
parsl.dataflow.dflow: INFO: Terminating flow_control and strategy threads
parsl.executors.threads: DEBUG: Done with executor shutdown
parsl.dataflow.dflow: INFO: DFK cleanup complete
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 12.018s

FAILED (errors=1)
@annawoodard

This comment has been minimized.

Copy link
Collaborator Author

annawoodard commented Mar 22, 2018

(I edited above for clarity)

I do not think
for test in tests/test_checkpointing/test*; do nosetests -vx $test; done
is actually enforcing that the tests pass. You can see the same error in the travis build:
https://travis-ci.org/Parsl/parsl/jobs/357085438

@annawoodard

This comment has been minimized.

Copy link
Collaborator Author

annawoodard commented Mar 22, 2018

I think it's because Travis is seeing an exit code zero (successfully ran through the loop, not successfully passed all the tests)

>for test in tests/test_checkpointing/test*; do nosetests -vx $test; done
...
>echo $?
0
>nosetests -xv test_checkpointing.test_periodic
>echo $?
1
@yadudoc

This comment has been minimized.

Copy link
Member

yadudoc commented Mar 22, 2018

I do not have a fix for the periodic test yet. As for the for loop this one seems to have the right behavior :
(for test in parsl/tests/test_checkpointing/test*; do nosetests -vx $test || exit; done ) ; echo $?

@annawoodard

This comment has been minimized.

Copy link
Collaborator Author

annawoodard commented Mar 23, 2018

Awesome! Thanks @yadudoc. Let's put that in for now. I think we should eventually aim for self-contained tests, but that is lower-priority than just having all the tests run and pass, so I'll open it as a separate issue.

@annawoodard annawoodard changed the title Tests are broken Fix broken tests Mar 23, 2018

@annawoodard

This comment has been minimized.

Copy link
Collaborator Author

annawoodard commented Mar 23, 2018

(I think imperative is better for issue titles, hence the change)

@annawoodard annawoodard added this to the Parsl-0.6.0 milestone May 9, 2018

@annawoodard annawoodard referenced this issue May 11, 2018

Merged

Tests #128 #272

@yadudoc yadudoc closed this in #272 May 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.