Comments (1)
I don't think this is purely a race condition... If instead of the assertion, you waited on the state changing to ACTIVE
, like below:
while (compConfigs.at(0).state != scr::dto::ComponentState::ACTIVE)
{
compConfigs = GetComponentConfigs(testBundle, componentName, compDescDTO);
}
The failing instance of the test case would never finish... i.e. this is not just 'we checked before some thread finished'
Additionally, when we first hit the while-loop, the componentConfig state is UNSATISFIED_REFERENCE
and then it changes to a SATISFIED_REFERENCE
but not an ACTIVE
one.
There is no direct transition from UNSATISFIED_REFERENCE
to ACTIVE
, but there is from SATISFIED_REFERENCE
to ACTIVE
upon activation.
Additionally...
If you added the line GetInstance<test::CAInterface>();
as already existed 5 lines prior to this loop such that the loop looks like:
while (compConfigs.at(0).state != scr::dto::ComponentState::ACTIVE)
{
instance = GetInstance<test::CAInterface>();
compConfigs = GetComponentConfigs(testBundle, componentName, compDescDTO);
}
the test no longer fails. When the loop is entered, the state of the compConfig[0]
is UNSATISFIED_REFERENCE
but after the two lines inside the while loop, it has changed to ACTIVE
...
I'm not totally sure why this is happening... but I think it has to do with somehow DS not recording that an instance of the service was requested the first time through
from cppmicroservices.
Related Issues (20)
- Guarantee that BundleContext::GetServiceReferences returns references sorted by rank
- Modify cppmicroservices Cmake build infrastructure to allow versioning of included libraries
- 如何运行Run CppMicroServices's ShellService ,开启终端命令行操作、查看服务状态、开启、停止、卸载等等?
- Installing /home/wd/app-feature-framework/build/vcpkg_installed/x64-linux-dynamic/lib/libusShellService.so Bundle #1 (location= /home/wd/app-feature-framework/build/vcpkg_installed/x64-linux-dynamic/lib/libusShellService.so) start failed: The bundle context is no longer valid free(): double free detected in tcache 2
- ./usShell3 --load=/home/wd/app-feature-framework/build/vcpkg_installed/x64-linux-dynamic/lib/libusShellService.so
- TestAutoInstallEmbeddedBundles fails when on a symlinked path
- Ensure ServiceReference objects are hashable after unregistration
- Fix code scanning alert - 'hRes' could be '0'.
- Fix code scanning alert - 'hResource' could be '0'.
- Fix code scanning alert - Variable 'cppmicroservices::BundleArchive::lastModified' is uninitialized. Always initialize a me...
- Fix code scanning alert - Members of 'cppmicroservices::FrameworkPrivate::FrameworkEventInternal' are uninitialized. Alw...
- Fix code scanning alert - AnyMap uninitialized variables
- Remove raw pointers from serviceTracker implementation
- Fix code scanning alerts - DS uninitialized variables
- Incorrect example for MakeInterfaceMap
- ServiceProperties usage is inconsistent
- Concurrent `bundle.stop()` and `framework.stop()` -- `SCRExtensionRegistry::Find(long bundleId)`
- On concurrent creation of many bundles and a small enough threadpool, we can deadlock the asyncWorkService
- update CodeQL to use latest version, v3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppmicroservices.