History log of /external/autotest/site_utils/log_socket_server_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ceff75aa2b94adeec388bef135bddf49164eaf0 04-Sep-2014 Dan Shi <dshi@chromium.org> [autotest] Fix log socket server unittest

The unittest works as:
1. start a process listen to a local socket, log any message received.
2. start 10 processes to write log to that socket.

It used to be that if the number of logs does not exactly match, the unittest
will fail. As it could be flake due to local network issue, one or two log
attempts could fail. This CL relaxes the check to allow the test to pass if
any message was received by log server.

BUG=chromium:408028
TEST=local unittest

Change-Id: I4392b4dba5a2da3812cf1e6756016dcd20053a11
Reviewed-on: https://chromium-review.googlesource.com/216494
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
/external/autotest/site_utils/log_socket_server_unittest.py
cd0a01d0017e6f4c8b5a83890021cefeae3ca64f 12-Jun-2014 Dan Shi <dshi@chromium.org> [autotest] Let log socket server use an unused port

BUG=chromium:383370
TEST=unittest

Change-Id: I56df36cb230d4f4f81f8ce1525b417a132c15aaf
Reviewed-on: https://chromium-review.googlesource.com/203542
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Jiaxi Luo <jiaxiluo@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/log_socket_server_unittest.py
1a34c36efb5d66485529c903cf9916aaf3237309 12-Apr-2014 Dan Shi <dshi@chromium.org> [autotest] Add a log socket server for RPM controller to write log from multiple processes

set_power_state call is executed in a new process. logging to a single file
from multiple process may cause the process to hang. A reliable solution is to
create a SocketHandler to log to a TCP server. The source code is from python
documentation:
https://docs.python.org/2/howto/logging-cookbook.html#network-logging

BUG=chromium:243567
DEPLOY=rpm
TEST=unittest, local test script
modify frontend_addr in rpm_config.ini to localhost
Add a dummy set_power_state call in rpm_controller.py to wait indefinitely.
Also add some logging call in it.
Run frontend_server and rpm_dispatcher in localhost
Run a test script that calls 500 duts, e.g., chromeos1-rack#-host 1, #=1-500
Wait for all calls to time out, check ps to make sure only 2 rpm_dispatcher
processes are running at the end (the additional one is for the TCP server
collecting log).

Change-Id: I594cb55c9a2230ac34c90eca7e9de355c21a0dca
Reviewed-on: https://chromium-review.googlesource.com/194432
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
/external/autotest/site_utils/log_socket_server_unittest.py