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

Fixed the SA test breaking in pycc mode where the data process was not actually running before assertions were made #562

Merged
merged 1 commit into from Feb 13, 2013

Conversation

swarbhanu
Copy link
Contributor

  • Instead of using UNS' find_events() method which is being refactored, we use pyon's event repository's find_events(). This method is used AFTER a create_data_process() method to look into the immediate past and find ProcessLifeCycle events for the process launched by the create_data_process() with the state equal to ProcessStateEnum.RUNNING. The find_events() method is not used in a bare way, otherwise it would miss a process that gets to running mode slowly. Instead, it is wrapped in a poller using a poll method in pyon utility. The poller blocks with a timeout of 10 seconds, until it finds the good event ("process is running") and only after that the rest of the test code is executed.

This should ensure that test does not prematurely try to continue down the road with assertions, when the process launched through create_data_process() is not actually running.

Note that we could not use EventSubscriber() since the process id used to listen is actually inside the data process returned by the create_data_process(). So we cannot setup the EventSubscriber before executing a create_data_process(). On the other hand, we could not use the EventSubscriber() after the create_data_process(), because then we would not be able to catch the superfast process launches.

So instead of looking to the future for process launch events, using a way that looked to the past for events in the database works.

  • The test works with or without pycc mode.

jamie-cyber1 pushed a commit that referenced this pull request Feb 13, 2013
Fixed the SA test breaking in pycc mode where the data process was not actually running before assertions were made
@jamie-cyber1 jamie-cyber1 merged commit e0bbe42 into ooici:master Feb 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants