Project

General

Profile

Actions

Bug #1706

closed

test-image in Dogpicker not working

Added by Arne Moeller over 12 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Amber Herold
Category:
-
Target version:
Start date:
04/11/2012
Due date:
% Done:

0%

Estimated time:
Affected Version:
Appion/Leginon 2.1.0
Show in known bugs:
No
Workaround:

Description

The test image in Dog picker is not working
- workaround is to switch to myamiweb

#1630


Related issues 1 (1 open0 closed)

Related to Appion - Test Case #1630: runDogPicker.phpFail03/14/2012

Actions
Actions #1

Updated by Amber Herold over 12 years ago

  • Assignee set to Amber Herold
Actions #2

Updated by Amber Herold over 12 years ago

  • Status changed from New to Assigned
  • Priority changed from Normal to High
  • Target version set to Appion/Leginon 2.2.0
Actions #3

Updated by Amber Herold over 12 years ago

The test single image feature is not working because there is a race condition.
If you run the command, it may not complete before the web page tries to report results. It helps if you set reading
the stream after ssh2_exec to be blocking, but blocking adds a good chance of hanging. There is also a sleep ofter the execute command (double yuckiness) to allow commands to complete before moving on, and I don't want to make it wait longer just for the test feature. Ideally, we should get rid of the sleep and try a different method of waiting for the command to execute. So far my reasearch finds silly solutions like writing a file at the end or adding echo "[end]" after the command and looking for [end] in the output stream. Crazy.

Since we are so close to a release, I will leave the sleep and wait a while for the test results to show up before assuming the test didn't run properly.

Actions #4

Updated by Amber Herold over 12 years ago

  • Status changed from Assigned to In Code Review
  • Assignee changed from Amber Herold to Anchi Cheng

Anchi, please take a look at this, it is a bit of a mess, so probably most important that you understand what I'm doing so that we can reasonably return to it in the future if needed.

There is something going on that I have not been able to determine... seems that the function to check if a file exists sometimes returns false even when the file exists, and will continue returning false for over 20 seconds before getting it right. Because of this, every once in a while, we will think there was an error because it looks like the file does not existr even though it does. In this case, I instruct the user to try refreshing the page, which will always load the image correctly.

Please assign to Arne to test.

Actions #5

Updated by Anchi Cheng over 12 years ago

  • Status changed from In Code Review to In Test
  • Assignee changed from Anchi Cheng to Arne Moeller

Code is as good as it can be in this situation.

Actions #6

Updated by Anchi Cheng over 12 years ago

  • Status changed from In Test to Assigned
  • Assignee changed from Arne Moeller to Amber Herold

$max_mod_time is not used but in its place 35 is hard-coded when it is needed.

35 seconad is not good on some computers. May need configuration by the installer.

Please assign back to Arne to test.

Actions #7

Updated by Anchi Cheng over 12 years ago

r16697 added clearstatcache before the first file_exists check so that JustShowCommand won't be stuck in "file not found" when user refreshs the page.

r16698 merge the same change to 2.2 branch

Actions #8

Updated by Amber Herold over 12 years ago

  • Target version changed from Appion/Leginon 2.2.0 to Appion/Leginon 2.2.1

Will take care of hard-coded 35 value in next version.

Actions #9

Updated by Amber Herold over 10 years ago

  • Status changed from Assigned to Closed

addressed in r18147

Actions

Also available in: Atom PDF