fuchsia_bluetooth/constants.rs
1// Copyright 2019 The Fuchsia 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#[cfg(target_os = "fuchsia")]
5use zx::MonotonicDuration;
6
7pub const DEV_DIR: &str = "/dev";
8pub const BT_SERVICE_DIR: &str = "/svc/fuchsia.hardware.bluetooth.Service";
9
10// Constants for creating bt-host component in bt-init and integration tests
11pub const BT_HOST_COLLECTION: &str = "bt-host-collection";
12pub const BT_HOST: &str = "bt-host";
13pub const BT_HOST_URL: &str = "bt-host#meta/bt-host.cm";
14
15// Use a timeout of 4 minutes on integration tests.
16//
17// This time is expected to be:
18// a) sufficient to avoid flakes due to infra or resource contention, except in many standard
19// deviations of unlikeliness
20// b) short enough to still provide useful feedback in those cases where asynchronous operations
21// fail
22// c) short enough to fail before the overall infra-imposed test timeout (currently 5 minutes),
23// so that we can produce specific test-relevant information in the case of failure.
24#[cfg(target_os = "fuchsia")]
25pub const INTEGRATION_TIMEOUT: MonotonicDuration = MonotonicDuration::from_minutes(4);