summaryrefslogtreecommitdiff
path: root/test/routing_tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/routing_tests')
-rwxr-xr-xtest/routing_tests/external_local_routing_test_client_external_start.sh2
-rw-r--r--test/routing_tests/external_local_routing_test_service.cpp16
-rw-r--r--test/routing_tests/external_local_routing_test_service.hpp3
-rwxr-xr-xtest/routing_tests/external_local_routing_test_service_start.sh2
-rwxr-xr-xtest/routing_tests/external_local_routing_test_starter.sh2
-rw-r--r--test/routing_tests/local_routing_test_client.cpp2
-rw-r--r--test/routing_tests/local_routing_test_client.hpp2
-rwxr-xr-xtest/routing_tests/local_routing_test_client_start.sh2
-rw-r--r--test/routing_tests/local_routing_test_service.cpp2
-rw-r--r--test/routing_tests/local_routing_test_service.hpp2
-rwxr-xr-xtest/routing_tests/local_routing_test_service_start.sh2
-rwxr-xr-xtest/routing_tests/local_routing_test_starter.sh2
12 files changed, 24 insertions, 15 deletions
diff --git a/test/routing_tests/external_local_routing_test_client_external_start.sh b/test/routing_tests/external_local_routing_test_client_external_start.sh
index a40dece..05bb510 100755
--- a/test/routing_tests/external_local_routing_test_client_external_start.sh
+++ b/test/routing_tests/external_local_routing_test_client_external_start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/external_local_routing_test_service.cpp b/test/routing_tests/external_local_routing_test_service.cpp
index 72899fd..745435f 100644
--- a/test/routing_tests/external_local_routing_test_service.cpp
+++ b/test/routing_tests/external_local_routing_test_service.cpp
@@ -1,5 +1,4 @@
-// Copyright (C) 2014 BMW Group
-// Author: Lutz Bichler (lutz.bichler@bmw.de)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -134,7 +133,9 @@ void external_local_routing_test_service::on_message(
if(number_received_messages_local_ >= vsomeip_test::NUMBER_OF_MESSAGES_TO_SEND
&& number_received_messages_external_ >= vsomeip_test::NUMBER_OF_MESSAGES_TO_SEND)
{
- app_->stop();
+ std::lock_guard<std::mutex> its_lock(mutex_);
+ blocked_ = true;
+ condition_.notify_one();
}
ASSERT_LT(number_received_messages_local_,
vsomeip_test::NUMBER_OF_MESSAGES_TO_SEND + 1);
@@ -148,10 +149,19 @@ void external_local_routing_test_service::run()
while (!blocked_)
condition_.wait(its_lock);
+ blocked_ = false;
if(use_static_routing_)
{
offer();
}
+
+ while (!blocked_) {
+ condition_.wait(its_lock);
+ }
+
+ std::thread t2([](){ usleep(1000000 * 2);});
+ t2.join();
+ app_->stop();
}
TEST(someip_external_local_routing_test, receive_ten_messages_over_local_and_external_socket)
diff --git a/test/routing_tests/external_local_routing_test_service.hpp b/test/routing_tests/external_local_routing_test_service.hpp
index 82f6220..f1e73b9 100644
--- a/test/routing_tests/external_local_routing_test_service.hpp
+++ b/test/routing_tests/external_local_routing_test_service.hpp
@@ -1,5 +1,4 @@
-// Copyright (C) 2014 BMW Group
-// Author: Lutz Bichler (lutz.bichler@bmw.de)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/external_local_routing_test_service_start.sh b/test/routing_tests/external_local_routing_test_service_start.sh
index e6ac677..c79428d 100755
--- a/test/routing_tests/external_local_routing_test_service_start.sh
+++ b/test/routing_tests/external_local_routing_test_service_start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/external_local_routing_test_starter.sh b/test/routing_tests/external_local_routing_test_starter.sh
index abee34d..36a85e6 100755
--- a/test/routing_tests/external_local_routing_test_starter.sh
+++ b/test/routing_tests/external_local_routing_test_starter.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_client.cpp b/test/routing_tests/local_routing_test_client.cpp
index 0659e48..a97c63c 100644
--- a/test/routing_tests/local_routing_test_client.cpp
+++ b/test/routing_tests/local_routing_test_client.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_client.hpp b/test/routing_tests/local_routing_test_client.hpp
index 311b6eb..cb30667 100644
--- a/test/routing_tests/local_routing_test_client.hpp
+++ b/test/routing_tests/local_routing_test_client.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_client_start.sh b/test/routing_tests/local_routing_test_client_start.sh
index 1c9cad9..cd36c77 100755
--- a/test/routing_tests/local_routing_test_client_start.sh
+++ b/test/routing_tests/local_routing_test_client_start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_service.cpp b/test/routing_tests/local_routing_test_service.cpp
index 7e04f01..90e7eed 100644
--- a/test/routing_tests/local_routing_test_service.cpp
+++ b/test/routing_tests/local_routing_test_service.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_service.hpp b/test/routing_tests/local_routing_test_service.hpp
index 8cd4fb9..f78d5b0 100644
--- a/test/routing_tests/local_routing_test_service.hpp
+++ b/test/routing_tests/local_routing_test_service.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_service_start.sh b/test/routing_tests/local_routing_test_service_start.sh
index acafd51..3536212 100755
--- a/test/routing_tests/local_routing_test_service_start.sh
+++ b/test/routing_tests/local_routing_test_service_start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
diff --git a/test/routing_tests/local_routing_test_starter.sh b/test/routing_tests/local_routing_test_starter.sh
index 97bd67d..fd82594 100755
--- a/test/routing_tests/local_routing_test_starter.sh
+++ b/test/routing_tests/local_routing_test_starter.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2015 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+# Copyright (C) 2015-2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.