diff options
author | Sven Gothel <[email protected]> | 2022-06-06 23:07:30 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-06-06 23:07:30 +0200 |
commit | 89261edc4bea1a7dbbfc6f28a678b4292350dac5 (patch) | |
tree | 4dc9c8aee19dd07bc58da555b058009cd4f7d0f9 /test | |
parent | d34b29395e569a9811764d8c397f11c4fbe562d6 (diff) |
Fix bringup tests (C++, Java): They run w/o elevated permissions, hence don't toggle state and require nothing
Diffstat (limited to 'test')
-rw-r--r-- | test/direct_bt/test_bringup00.cpp | 10 | ||||
-rw-r--r-- | test/java/test/org/direct_bt/TestBringup00.java | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/test/direct_bt/test_bringup00.cpp b/test/direct_bt/test_bringup00.cpp index 701035d7..ca43b296 100644 --- a/test/direct_bt/test_bringup00.cpp +++ b/test/direct_bt/test_bringup00.cpp @@ -41,9 +41,10 @@ void resetStates() { jau::darray<BTAdapterRef> adapters = mngr->getAdapters(); for(BTAdapterRef a : adapters) { a->removeAllStatusListener(); - a->stopAdvertising(); - a->stopDiscovery(); - REQUIRE( a->setPowered(false) ); + // test runs w/o elevated permissions + // a->stopAdvertising(); + // a->stopDiscovery(); + // REQUIRE( a->setPowered(false) ); } mngr->removeAllChangedAdapterSetCallbacks(); BTDeviceRegistry::clearWaitForDevices(); @@ -74,8 +75,9 @@ TEST_CASE( "BTManager Bringup Test 00", "[test][BTManager][bringup]" ) { } jau::fprintf_td(stderr, "Adapter: Status Checks\n"); for(BTAdapterRef a : adapters) { + // test runs w/o elevated permissions REQUIRE( false == a->isInitialized() ); - REQUIRE( false == a->isPowered() ); + // REQUIRE( false == a->isPowered() ); REQUIRE( BTRole::Master == a->getRole() ); // default role REQUIRE( 4 <= a->getBTMajorVersion() ); } diff --git a/test/java/test/org/direct_bt/TestBringup00.java b/test/java/test/org/direct_bt/TestBringup00.java index 33b8c684..84a93211 100644 --- a/test/java/test/org/direct_bt/TestBringup00.java +++ b/test/java/test/org/direct_bt/TestBringup00.java @@ -67,10 +67,11 @@ public class TestBringup00 extends SingletonJunitCase { if( null != manager ) { final List<BTAdapter> adapters = manager.getAdapters(); for(final BTAdapter a : adapters) { + // test runs w/o elevated permissions a.removeAllStatusListener(); - a.stopAdvertising(); - a.stopDiscovery(); - Assert.assertTrue( a.setPowered(false) ); + // a.stopAdvertising(); + // a.stopDiscovery(); + // Assert.assertTrue( a.setPowered(false) ); } } manager.removeAllChangedAdapterSetListener(); @@ -110,8 +111,9 @@ public class TestBringup00 extends SingletonJunitCase { BTUtils.println(System.err, i+": "+adapters.get(i).toString()); } for(final BTAdapter a : adapters) { + // test runs w/o elevated permissions Assert.assertFalse( a.isInitialized() ); - Assert.assertFalse( a.isPowered() ); + // Assert.assertFalse( a.isPowered() ); Assert.assertEquals( BTRole.Master, a.getRole() ); // default role Assert.assertTrue( 4 <= a.getBTMajorVersion() ); } |