• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "ChromeOS Team"
6NAME = "cellular_DisableWhileConnecting"
7PURPOSE = "Check that the 3G modem can handle a disconnect while connecting."
8CRITERIA = """
9This test will fail if a disconnect request while the modem is
10connecting is not promptly executed.
11"""
12ATTRIBUTES = "suite:cellular_qual"
13TIME = "SHORT"
14TEST_CATEGORY = "Functional"
15TEST_CLASS = "network"
16TEST_TYPE = "client"
17
18DOC = """
19Check that the 3G modem can handle a disconnect while connecting.
20"""
21
22from autotest_lib.client.cros.cellular import test_environment
23
24ITERATIONS_PER_TEST=1
25
26test_env = test_environment.CellularOTATestEnvironment()
27job.run_test('cellular_DisableWhileConnecting',
28             test_env=test_env,
29             delay_before_disable_ms=0,
30             disable_delay_per_iteration_ms=0,
31             iterations=ITERATIONS_PER_TEST,
32             tag='instant_disable')
33
34# Since dbus-python emits our calls asynchronously, it is sometimes
35# (often?) the case that the disable arrives before the connect.
36# There's no good way to track what actually gets sent first, so we
37# sleep.
38test_env = test_environment.CellularOTATestEnvironment()
39job.run_test('cellular_DisableWhileConnecting',
40             test_env=test_env,
41             delay_before_disable_ms=0,
42             disable_delay_per_iteration_ms=int(1000.0 / ITERATIONS_PER_TEST),
43             iterations=ITERATIONS_PER_TEST,
44             tag='disable_delay_ramp')
45