add Associations endpoints change delay timer

When multiple associations that point to the same interface are
created, each change (adding or removing one) leads to updating
"endpoints" property on dbus. This property update is time consuming
with many endpoints already present, because each update needs to send
the whole list of current elements plus/minus one. With a lot of
changes in short time it can cause the service to be unresponsive.
This change adds timer to delay updating dbus property. This way many
associations updates can be aggregated into single dbus property
update.

Tested: Ran on hardware with dbus sensor tester. 4000 created sensors
with interfaces are processed within 10 seconds. Time before the change
was above 2 minutes.

Signed-off-by: Kallas, Pawel <pawel.kallas@intel.com>
Change-Id: I1083c027ab12238249cffc67fb29a8ffef6baf83
diff --git a/src/test/name_change.cpp b/src/test/name_change.cpp
index 860a387..2730c67 100644
--- a/src/test/name_change.cpp
+++ b/src/test/name_change.cpp
@@ -5,7 +5,14 @@
 #include <gtest/gtest.h>
 
 class TestNameChange : public AsioServerClassTest
-{};
+{
+  public:
+    boost::asio::io_context io;
+    virtual void SetUp()
+    {
+        io.run();
+    }
+};
 sdbusplus::asio::object_server* TestNameChange::AsioServerClassTest::server =
     nullptr;
 
@@ -19,7 +26,7 @@
     InterfaceMapType interfaceMap;
     AssociationMaps assocMaps;
 
-    processNameChangeDelete(nameOwners, wellKnown, oldOwner, interfaceMap,
+    processNameChangeDelete(io, nameOwners, wellKnown, oldOwner, interfaceMap,
                             assocMaps, *server);
     EXPECT_EQ(nameOwners.size(), 0);
 }
@@ -40,8 +47,8 @@
     auto interfaceMap = createInterfaceMap(defaultSourcePath, defaultDbusSvc,
                                            assocInterfacesSet);
 
-    processNameChangeDelete(nameOwners, defaultDbusSvc, oldOwner, interfaceMap,
-                            assocMaps, *server);
+    processNameChangeDelete(io, nameOwners, defaultDbusSvc, oldOwner,
+                            interfaceMap, assocMaps, *server);
     EXPECT_EQ(nameOwners.size(), 0);
 
     // Verify owner association was deleted