Skip to content

Commit

Permalink
[bt][a2dp-source-integration-tests] Re-enable tests
Browse files Browse the repository at this point in the history
Context: After the A2DP component merge, the a2dp source integration
tests started to flake. The exact flake is seen in the attempt to
connect to the cobalt.LoggerFactory service. Occasionally, tests that
were run in parallel would fail to connect to the LoggerFactory service, resulting
in an ERROR severity log and therefore failing the test. From an initial
investigation, it looks like test #1 is able to connect to the service,
but when test #2 tries shortly after, it fails due to a PEER_CLOSED on
it's ClientEnd of the FIDL channel. This could be because the ServerEnd
is getting dropped somehow. The mock_cobalt component is capable of
supporting multiple clients, so the parallelism in that regard should be
ok.

- Update manifest to use the new system services.

- As a temporary measure to re-enable the tests, limit the parallelism
of the tests to one thread. This eliminates the flakes mentioned above.
fxbug.dev/69212 tracks the work around debugging why concurrent service
accesses are failing. The net benefit of re-enabling the integration
tests outweighs the decreased performance of the tests when limiting its
parallelism.

Fixed: 67823
Test: fx test bt-a2dp-source-integration-tests

Multiply: bt-a2dp-source-integration-tests
Change-Id: Ib1151e516883bb01c3d3a2080e7ef186f25d0ee6
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/480658
Reviewed-by: Nick Pollard <nickpollard@google.com>
Commit-Queue: Ani Ramakrishnan <aniramakri@google.com>
  • Loading branch information
Ani Ramakrishnan authored and CQ Bot committed Feb 4, 2021
1 parent f12cb3a commit dd1b731
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/connectivity/bluetooth/profiles/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ group("tests") {
testonly = true
deps = [
"bt-a2dp-loopback",

# Disabled due to test flakes.
# TODO(fxbug.dev/67823): Re-enable this after fixing flake issues.
# "bt-a2dp-source-integration-tests",
"bt-a2dp-source-integration-tests",
"bt-avrcp-integration-tests",

# Mock cobalt component that is injected into the integration tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@
"fuchsia.test": {
"injected-services": {
"fuchsia.cobalt.LoggerFactory": "fuchsia-pkg://fuchsia.com/mock_cobalt#meta/mock_cobalt.cmx",
"fuchsia.mediacodec.CodecFactory": "fuchsia-pkg://fuchsia.com/codec_factory#meta/codec_factory.cmx",
"fuchsia.sysmem.Allocator": "fuchsia-pkg://fuchsia.com/sysmem_connector#meta/sysmem_connector.cmx"
}
"fuchsia.mediacodec.CodecFactory": "fuchsia-pkg://fuchsia.com/codec_factory#meta/codec_factory.cmx"
},
"system-services": [
"fuchsia.sysinfo.SysInfo",
"fuchsia.sysmem.Allocator"
]
}
},
"include": [
"sdk/lib/diagnostics/syslog/client.shard.cmx"
],
"program": {
"args": [
"--test-threads=1"
],
"binary": "bin/bt_a2dp_source_integration_tests"
},
"sandbox": {
"services": [
"fuchsia.cobalt.LoggerFactory",
"fuchsia.mediacodec.CodecFactory",
"fuchsia.process.Launcher",
"fuchsia.sys.Environment",
"fuchsia.sys.Launcher",
"fuchsia.sys.Loader",
"fuchsia.sysinfo.SysInfo",
"fuchsia.sysmem.Allocator"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ fn a2dp_sink_service_definition() -> ServiceDefinition {
fn a2dp_source_launch_info() -> LaunchInfo {
LaunchInfo {
component_url: Some(A2DP_URL.to_string()),
arguments: Some(vec!["--enable-sink".to_string(), "false".to_string()]),
arguments: Some(vec![
"--enable-sink".to_string(),
"false".to_string(),
"--enable-avrcp-target".to_string(),
"false".to_string(),
]),
..LaunchInfo::EMPTY
}
}
Expand Down

0 comments on commit dd1b731

Please sign in to comment.