Closed Bug 744530 Opened 12 years ago Closed 12 years ago

SUT agent: do not routinely report expected exceptions

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: gbrown, Assigned: gbrown)

Details

Attachments

(1 file)

tbpl logs for robocop frequently show:

04-11 10:53:53.845 W/System.err( 1433): java.lang.IllegalThreadStateException: Process has not yet terminated.
04-11 10:53:53.845 W/System.err( 1433): 	at java.lang.ProcessManager$ProcessImpl.exitValue(ProcessManager.java:286)
04-11 10:53:53.845 W/System.err( 1433): 	at com.mozilla.SUTAgentAndroid.service.DoCommand.StartPrg2(DoCommand.java:3636)
04-11 10:53:53.845 W/System.err( 1433): 	at com.mozilla.SUTAgentAndroid.service.DoCommand.processCommand(DoCommand.java:697)
04-11 10:53:53.845 W/System.err( 1433): 	at com.mozilla.SUTAgentAndroid.service.CmdWorkerThread.run(CmdWorkerThread.java:164)


This indicates that exitValue was called on a process that is still running -- entirely expected in this context when a test runs for longer than 10 seconds.

I want to remove the printStackTrace() call to make the logs cleaner -- less time wasted investigating this message in future and less chance of missing real error alerts.
Similarly, this exception occurs routinely, at least during Robocop runs:

W/System.err(11385): java.io.FileNotFoundException: /mnt/sdcard/tests/profile/extensions/staged/worker-test@mozilla.org/components/WorkerTest.manifest (No such file or directory)
W/System.err(11385): 	at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
W/System.err(11385): 	at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
W/System.err(11385): 	at java.io.FileInputStream.<init>(FileInputStream.java:82)
W/System.err(11385): 	at java.io.FileInputStream.<init>(FileInputStream.java:134)
W/System.err(11385): 	at com.mozilla.SUTAgentAndroid.service.DoCommand.HashFile(DoCommand.java:1522)
W/System.err(11385): 	at com.mozilla.SUTAgentAndroid.service.DoCommand.processCommand(DoCommand.java:514)
W/System.err(11385): 	at com.mozilla.SUTAgentAndroid.service.CmdWorkerThread.run(CmdWorkerThread.java:164)
Summary: SUT agent: do not routinely report IllegalThreadStateException → SUT agent: do not routinely report expected exceptions
With this patch, those 2 stack traces are eliminated; instead, logcat shows something like:

D/SUT     (11803): HashFile: java.io.FileNotFoundException: /mnt/sdcard/tests/profile/extensions/staged/worker-test@mozilla.org/components/WorkerTest.manifest (No such file or directory)
D/SUT     (11803): StartPrg2 waited 10s for am
D/SUT     (11803): StartPrg2 waited 10s for am
D/SUT     (11803): StartPrg2 waited 10s for am

These are debug messages, so should not appear in the tbpl logs.
Attachment #614167 - Flags: review?(ctalbert)
Attachment #614167 - Flags: review?(ctalbert) → review+
Keywords: checkin-needed
Fixed the bug number for you ;-)

https://hg.mozilla.org/integration/mozilla-inbound/rev/96425a35b883
Flags: in-testsuite-
Keywords: checkin-needed
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/96425a35b883
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: