From 3d9a3e532b9b2933243e3699bd84dd7395d64282 Mon Sep 17 00:00:00 2001
From: Carsten Patzke <carsten.patzke@desy.de>
Date: Fri, 17 Apr 2020 19:58:17 +0200
Subject: [PATCH] Changed all full_chain tests to tcp tests, with some fabric
 tests in between

---
 .../consumer/getnext_broker/check_linux.sh    |  2 +-
 .../consumer/getnext_broker/check_windows.bat |  2 +-
 .../getnext_broker_python/check_linux.sh      |  4 +--
 .../getnext_broker_python/check_windows.bat   |  8 +++---
 examples/pipeline/in_to_out/check_linux.sh    |  4 +--
 examples/pipeline/in_to_out/check_windows.bat |  4 +--
 .../pipeline/in_to_out_python/check_linux.sh  |  2 +-
 .../in_to_out_python/check_windows.bat        |  2 +-
 .../consumer_python_memleak/check_linux.sh    |  4 +--
 .../consumer_python_memleak/memleak.py        |  6 ++---
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            | 11 +++++---
 .../check_windows.bat                         |  2 +-
 .../consumer/consumer_api/check_linux.sh      |  4 +--
 .../consumer/consumer_api/check_windows.bat   |  4 +--
 .../consumer_api_python/check_linux.sh        |  4 +--
 .../consumer_api_python/check_windows.bat     |  4 +--
 .../consumer_api_python/consumer_api.py       |  9 ++++---
 .../next_multithread_broker/check_linux.sh    |  2 +-
 .../next_multithread_broker/check_windows.bat |  2 +-
 .../curl_http_client_command/check_linux.sh   |  2 +-
 .../check_windows.bat                         |  2 +-
 .../send_recv_substreams/CMakeLists.txt       |  2 +-
 .../send_recv_substreams/check_linux.sh       |  6 +++--
 .../send_recv_substreams/check_windows.bat    |  2 +-
 .../send_recv_substreams.cpp                  |  2 +-
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            |  6 +++--
 .../check_windows.bat                         |  2 +-
 .../send_recv_substreams.py                   |  8 +++---
 .../full_chain/simple_chain/CMakeLists.txt    |  6 ++++-
 .../full_chain/simple_chain/check_linux.sh    | 19 +++++++++-----
 .../full_chain/simple_chain/check_windows.bat |  2 +-
 .../simple_chain_dataset/CMakeLists.txt       |  2 +-
 .../simple_chain_dataset/check_linux.sh       | 19 ++++++++------
 .../simple_chain_dataset/check_windows.bat    |  2 +-
 .../simple_chain_filegen/CMakeLists.txt       |  2 +-
 .../simple_chain_filegen/check_linux.sh       | 16 ++++++++----
 .../simple_chain_filegen/check_windows.bat    |  2 +-
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            | 17 +++++++-----
 .../check_windows.bat                         |  2 +-
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            | 24 ++++++++++-------
 .../check_windows.bat                         |  2 +-
 .../CMakeLists.txt                            |  6 ++++-
 .../check_linux.sh                            | 15 +++++++----
 .../check_windows.bat                         |  2 +-
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            | 17 +++++++-----
 .../check_windows.bat                         |  2 +-
 .../simple_chain_metadata/CMakeLists.txt      |  2 +-
 .../simple_chain_metadata/check_linux.sh      | 17 +++++++-----
 .../simple_chain_metadata/check_windows.bat   |  2 +-
 .../CMakeLists.txt                            |  2 +-
 .../check_linux.sh                            | 17 +++++++-----
 .../check_windows.bat                         |  2 +-
 .../get_user_meta.py                          |  5 ++--
 .../full_chain/two_beamlines/CMakeLists.txt   |  2 +-
 .../full_chain/two_beamlines/check_linux.sh   | 21 +++++++++------
 .../two_beamlines/check_windows.bat           |  4 +--
 .../full_chain/two_streams/CMakeLists.txt     |  2 +-
 .../full_chain/two_streams/check_linux.sh     | 20 ++++++++------
 .../full_chain/two_streams/check_windows.bat  |  4 +--
 .../broker_mongo_restart/CMakeLists.txt       |  2 +-
 .../broker_mongo_restart/check_linux.sh       | 15 +++++++----
 .../services_restart/CMakeLists.txt           |  4 +--
 .../services_restart/check_linux.sh           | 26 ++++++++++++-------
 .../python_tests/consumer/consumer_api.py     |  6 ++---
 tests/manual/python_tests/consumer/test.sh    |  2 +-
 .../python_tests/consumer/test_asap3.sh       |  2 +-
 .../manual/python_tests/consumer/test_k8s.sh  |  4 +--
 72 files changed, 259 insertions(+), 181 deletions(-)
 mode change 100644 => 100755 tests/automatic/full_chain/simple_chain/check_linux.sh

diff --git a/examples/consumer/getnext_broker/check_linux.sh b/examples/consumer/getnext_broker/check_linux.sh
index 01b701c9b..501af6825 100644
--- a/examples/consumer/getnext_broker/check_linux.sh
+++ b/examples/consumer/getnext_broker/check_linux.sh
@@ -30,7 +30,7 @@ done
 
 sleep 1
 
-$@ 127.0.0.1:8400 $source_path $beamtime_id 2 $token_test_run 12000 1  | tee /dev/stderr | grep "Processed 3 file(s)"
+$@ 127.0.0.1:8400 tcp $source_path $beamtime_id 2 $token_test_run 12000 1  | tee /dev/stderr | grep "Processed 3 file(s)"
 
 
 
diff --git a/examples/consumer/getnext_broker/check_windows.bat b/examples/consumer/getnext_broker/check_windows.bat
index 6945e1dba..8dcbc3182 100644
--- a/examples/consumer/getnext_broker/check_windows.bat
+++ b/examples/consumer/getnext_broker/check_windows.bat
@@ -12,7 +12,7 @@ call start_services.bat
 for /l %%x in (1, 1, 3) do echo db.data_default.insert({"_id":%%x,"size":100,"name":"%%x","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}}) | %mongo_exe% %database_name%  || goto :error
 
 
-"%1" 127.0.0.1:8400 %source_path% %beamtime_id% 1 %token_test_run% 12000 1 | findstr /c:"Processed 3 file" || goto :error
+"%1" 127.0.0.1:8400 tcp %source_path% %beamtime_id% 1 %token_test_run% 12000 1 | findstr /c:"Processed 3 file" || goto :error
 goto :clean
 
 :error
diff --git a/examples/consumer/getnext_broker_python/check_linux.sh b/examples/consumer/getnext_broker_python/check_linux.sh
index b1a508025..ea6fb7e59 100644
--- a/examples/consumer/getnext_broker_python/check_linux.sh
+++ b/examples/consumer/getnext_broker_python/check_linux.sh
@@ -36,13 +36,13 @@ export PYTHONPATH=$1:${PYTHONPATH}
 Python_EXECUTABLE=$2
 
 
-$Python_EXECUTABLE getnext.py 127.0.0.1:8400 $source_path $beamtime_id $token_test_run $group_id > out
+$Python_EXECUTABLE getnext.py 127.0.0.1:8400 tcp $source_path $beamtime_id $token_test_run $group_id > out
 cat out
 cat out | grep '"size": 100'
 cat out | grep '"_id": 1'
 cat out | grep '"meta_test": "test"'
 
-$Python_EXECUTABLE getnext.py 127.0.0.1:8400 $source_path $beamtime_id $token_test_run $group_id> out
+$Python_EXECUTABLE getnext.py 127.0.0.1:8400 tcp $source_path $beamtime_id $token_test_run $group_id> out
 cat out
 cat out | grep '"_id": 2'
 
diff --git a/examples/consumer/getnext_broker_python/check_windows.bat b/examples/consumer/getnext_broker_python/check_windows.bat
index 449809893..dfdb7ae17 100644
--- a/examples/consumer/getnext_broker_python/check_windows.bat
+++ b/examples/consumer/getnext_broker_python/check_windows.bat
@@ -16,22 +16,22 @@ echo db.meta.insert({"_id":0,"meta_test":"test"}) | %mongo_exe% %database_name%
 
 set PYTHONPATH=%1
 
-python3 getnext.py 127.0.0.1:8400  %source_path% %beamtime_id%  %token_test_run% %group_id% > out
+python3 getnext.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run% %group_id% > out
 type out
 type out | findstr /c:"100" || goto :error
 type out | findstr /c:"\"_id\": 1" || goto :error
 type out | findstr /c:"\"meta_test\": \"test\"" || goto :error
 
-python3 getnext.py 127.0.0.1:8400  %source_path% %beamtime_id%  %token_test_run% %group_id% > out
+python3 getnext.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run% %group_id% > out
 type out
 type out | findstr /c:"\"_id\": 2" || goto :error
 
-python3 getnext.py 127.0.0.1:8400  %source_path% %beamtime_id%  %token_test_run% %group_id% > out
+python3 getnext.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run% %group_id% > out
 type out
 type out | findstr /c:"\"_id\": 3" || goto :error
 
 
-python3 getnext.py 127.0.0.1:8400  %source_path% %beamtime_id%  %token_test_run% new > out
+python3 getnext.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run% new > out
 type out
 type out | findstr /c:"100" || goto :error
 type out | findstr /c:"\"_id\": 1" || goto :error
diff --git a/examples/pipeline/in_to_out/check_linux.sh b/examples/pipeline/in_to_out/check_linux.sh
index 6490fbadb..0657d34ad 100644
--- a/examples/pipeline/in_to_out/check_linux.sh
+++ b/examples/pipeline/in_to_out/check_linux.sh
@@ -59,7 +59,7 @@ done
 
 sleep 1
 
-$1 127.0.0.1:8400 $source_path $beamtime_id $stream_in $stream_out $token 2 1000 25000 1  > out
+$1 127.0.0.1:8400 tcp $source_path $beamtime_id $stream_in $stream_out $token 2 1000 25000 1  > out
 cat out
 cat out | grep "Processed 3 file(s)"
 cat out | grep "Sent 3 file(s)"
@@ -70,7 +70,7 @@ cat ${receiver_folder}/file1_${stream_out} | grep hello1
 cat ${receiver_folder}/file2_${stream_out} | grep hello2
 cat ${receiver_folder}/file3_${stream_out} | grep hello3
 
-$1 127.0.0.1:8400 $source_path $beamtime_id $stream_in $stream_out2 $token 2 1000 25000 0  > out2
+$1 127.0.0.1:8400 tcp $source_path $beamtime_id $stream_in $stream_out2 $token 2 1000 25000 0  > out2
 cat out2
 test ! -f ${receiver_folder}/file1_${stream_out2}
 echo "db.data_default.find({"_id":1})" | mongo ${outdatabase_name2} | tee /dev/stderr | grep ./file1
diff --git a/examples/pipeline/in_to_out/check_windows.bat b/examples/pipeline/in_to_out/check_windows.bat
index 9b575777b..56ef0b8e5 100644
--- a/examples/pipeline/in_to_out/check_windows.bat
+++ b/examples/pipeline/in_to_out/check_windows.bat
@@ -29,7 +29,7 @@ echo hello2 > file2
 echo hello3 > file3
 
 
-"%1" 127.0.0.1:8400 %source_path% %beamtime_id%  %stream_in% %stream_out% %token% 2 1000 25000 1 > out
+"%1" 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %stream_in% %stream_out% %token% 2 1000 25000 1 > out
 type out
 findstr /I /L /C:"Processed 3 file(s)" out || goto :error
 findstr /I /L /C:"Sent 3 file(s)" out || goto :error
@@ -41,7 +41,7 @@ findstr /I /L /C:"hello2" %receiver_folder%\file2_%stream_out% || goto :error
 findstr /I /L /C:"hello3" %receiver_folder%\file3_%stream_out% || goto :error
 
 
-"%1" 127.0.0.1:8400 %source_path% %beamtime_id%  %stream_in% %stream_out2% %token% 2 1000 25000 0 > out2
+"%1" 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %stream_in% %stream_out2% %token% 2 1000 25000 0 > out2
 type out2
 findstr /I /L /C:"Processed 3 file(s)" out2 || goto :error
 findstr /I /L /C:"Sent 3 file(s)" out2 || goto :error
diff --git a/examples/pipeline/in_to_out_python/check_linux.sh b/examples/pipeline/in_to_out_python/check_linux.sh
index 330f40973..a105639bc 100644
--- a/examples/pipeline/in_to_out_python/check_linux.sh
+++ b/examples/pipeline/in_to_out_python/check_linux.sh
@@ -64,7 +64,7 @@ sleep 1
 export PYTHONPATH=$2:$3:${PYTHONPATH}
 
 
-$1 $4 127.0.0.1:8400 $source_path $beamtime_id $stream_in $stream_out $token $timeout $timeout_producer $nthreads 1  > out
+$1 $4 127.0.0.1:8400 tcp $source_path $beamtime_id $stream_in $stream_out $token $timeout $timeout_producer $nthreads 1  > out
 cat out
 cat out | grep "Processed 3 file(s)"
 cat out | grep "Sent 3 file(s)"
diff --git a/examples/pipeline/in_to_out_python/check_windows.bat b/examples/pipeline/in_to_out_python/check_windows.bat
index b93a7f38c..90c436447 100644
--- a/examples/pipeline/in_to_out_python/check_windows.bat
+++ b/examples/pipeline/in_to_out_python/check_windows.bat
@@ -32,7 +32,7 @@ echo hello3 > file3
 
 set PYTHONPATH=%2;%3
 
-"%1" "%4" 127.0.0.1:8400 %source_path% %beamtime_id% %stream_in% %stream_out% %token% %timeout% %timeout_producer% %nthreads% 1  > out
+"%1" "%4" 127.0.0.1:8400 tcp %source_path% %beamtime_id% %stream_in% %stream_out% %token% %timeout% %timeout_producer% %nthreads% 1  > out
 
 type out
 findstr /I /L /C:"Processed 3 file(s)" out || goto :error
diff --git a/tests/automatic/bug_fixes/consumer_python_memleak/check_linux.sh b/tests/automatic/bug_fixes/consumer_python_memleak/check_linux.sh
index edf36d296..ae7b712a2 100644
--- a/tests/automatic/bug_fixes/consumer_python_memleak/check_linux.sh
+++ b/tests/automatic/bug_fixes/consumer_python_memleak/check_linux.sh
@@ -35,7 +35,7 @@ export PYTHONPATH=$1:${PYTHONPATH}
 export Python_EXECUTABLE=$2
 
 
-$Python_EXECUTABLE memleak.py $endpoint $path $beamtime_id $token &> out &
+$Python_EXECUTABLE memleak.py $endpoint tcp $path $beamtime_id $token &> out &
 pid=`echo $!`
 
 sleep 1
@@ -53,4 +53,4 @@ leak=$(( $mem2 - $mem1 ))
 cat out
 echo leak: $leak
 
-test $leak -lt 300000
\ No newline at end of file
+test $leak -lt 300000
diff --git a/tests/automatic/bug_fixes/consumer_python_memleak/memleak.py b/tests/automatic/bug_fixes/consumer_python_memleak/memleak.py
index 2f5eaac9b..28a61f22d 100644
--- a/tests/automatic/bug_fixes/consumer_python_memleak/memleak.py
+++ b/tests/automatic/bug_fixes/consumer_python_memleak/memleak.py
@@ -1,11 +1,11 @@
 import asapo_consumer
-import time
 import sys
+import time
 
-source, path, beamtime, token = sys.argv[1:]
+source, network_type, path, beamtime, token = sys.argv[1:]
 
 broker = asapo_consumer.create_server_broker(
-    source, path,True, beamtime, "stream", token, 1000)
+    source, path,True, beamtime, "stream", token, 1000, network_type)
 
 group_id  = broker.generate_group_id()
 print('generated group id: ', group_id)
diff --git a/tests/automatic/bug_fixes/producer_send_after_restart/CMakeLists.txt b/tests/automatic/bug_fixes/producer_send_after_restart/CMakeLists.txt
index 56a0067a3..cea0d39ae 100644
--- a/tests/automatic/bug_fixes/producer_send_after_restart/CMakeLists.txt
+++ b/tests/automatic/bug_fixes/producer_send_after_restart/CMakeLists.txt
@@ -13,4 +13,4 @@ endif()
 
 configure_file(test.json.in test.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/bug_fixes/producer_send_after_restart/check_linux.sh b/tests/automatic/bug_fixes/producer_send_after_restart/check_linux.sh
index dd1302e80..a572806f4 100644
--- a/tests/automatic/bug_fixes/producer_send_after_restart/check_linux.sh
+++ b/tests/automatic/bug_fixes/producer_send_after_restart/check_linux.sh
@@ -4,6 +4,11 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
 
 monitor_database_name=db_test
@@ -31,14 +36,14 @@ Cleanup() {
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 
 sleep 1
 
 #producer
 mkdir -p ${receiver_folder}
-$1 test.json &> output &
+$producer_bin test.json &> output &
 producerid=`echo $!`
 
 sleep 1
@@ -47,7 +52,7 @@ echo hello > /tmp/asapo/test_in/test1/file1
 sleep 1
 nomad stop receiver
 sleep 1
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 
 echo hello > /tmp/asapo/test_in/test1/file1
 sleep 1
diff --git a/tests/automatic/bug_fixes/producer_send_after_restart/check_windows.bat b/tests/automatic/bug_fixes/producer_send_after_restart/check_windows.bat
index 815dffc54..1f5763184 100644
--- a/tests/automatic/bug_fixes/producer_send_after_restart/check_windows.bat
+++ b/tests/automatic/bug_fixes/producer_send_after_restart/check_windows.bat
@@ -45,7 +45,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 3000 1 | findstr /c:"Processed 3 file(s)"  || goto :error
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 3000 1 | findstr /c:"Processed 3 file(s)"  || goto :error
 
 
 goto :clean
diff --git a/tests/automatic/consumer/consumer_api/check_linux.sh b/tests/automatic/consumer/consumer_api/check_linux.sh
index be6442d3a..dd9e5e6ce 100644
--- a/tests/automatic/consumer/consumer_api/check_linux.sh
+++ b/tests/automatic/consumer/consumer_api/check_linux.sh
@@ -45,7 +45,7 @@ done
 echo hello1 > 1
 
 
-$@ 127.0.0.1:8400 $beamtime_id $token_test_run single
+$@ 127.0.0.1:8400 tcp $beamtime_id $token_test_run single
 
 #check datasets
 echo "db.dropDatabase()" | mongo ${database_name}
@@ -65,4 +65,4 @@ done
 
 echo hello1 > 1_1
 
-$@ 127.0.0.1:8400 $beamtime_id $token_test_run datasets
+$@ 127.0.0.1:8400 tcp $beamtime_id $token_test_run datasets
diff --git a/tests/automatic/consumer/consumer_api/check_windows.bat b/tests/automatic/consumer/consumer_api/check_windows.bat
index 6619a5c96..355c3a5df 100644
--- a/tests/automatic/consumer/consumer_api/check_windows.bat
+++ b/tests/automatic/consumer/consumer_api/check_windows.bat
@@ -16,7 +16,7 @@ for /l %%x in (1, 1, 5) do echo db.data_stream2.insert({"_id":%%x,"size":6,"name
 echo hello1 > 1
 
 
-%1 127.0.0.1:8400 %beamtime_id% %token_test_run%  single || goto :error
+%1 127.0.0.1:8400 tcp %beamtime_id% %token_test_run%  single || goto :error
 
 echo db.dropDatabase() | %mongo_exe% %database_name%
 
@@ -24,7 +24,7 @@ for /l %%x in (1, 1, 10) do echo db.data_default.insert({"_id":%%x,"size":3,"ima
 
 echo hello1 > 1_1
 
-%1 127.0.0.1:8400 %beamtime_id% %token_test_run%  datasets || goto :error
+%1 127.0.0.1:8400 tcp %beamtime_id% %token_test_run%  datasets || goto :error
 
 goto :clean
 
diff --git a/tests/automatic/consumer/consumer_api_python/check_linux.sh b/tests/automatic/consumer/consumer_api_python/check_linux.sh
index 04f3c058b..9ad982107 100644
--- a/tests/automatic/consumer/consumer_api_python/check_linux.sh
+++ b/tests/automatic/consumer/consumer_api_python/check_linux.sh
@@ -52,7 +52,7 @@ sleep 1
 
 export PYTHONPATH=$1:${PYTHONPATH}
 export Python_EXECUTABLE=$2
-$Python_EXECUTABLE $3/consumer_api.py 127.0.0.1:8400 $source_path $beamtime_id $token_test_run single
+$Python_EXECUTABLE $3/consumer_api.py 127.0.0.1:8400 tcp $source_path $beamtime_id $token_test_run single
 
 #check datasets
 echo "db.dropDatabase()" | mongo ${database_name} > /dev/null
@@ -71,4 +71,4 @@ do
 done
 
 
-$Python_EXECUTABLE $3/consumer_api.py 127.0.0.1:8400 $source_path $beamtime_id $token_test_run datasets
+$Python_EXECUTABLE $3/consumer_api.py 127.0.0.1:8400 tcp $source_path $beamtime_id $token_test_run datasets
diff --git a/tests/automatic/consumer/consumer_api_python/check_windows.bat b/tests/automatic/consumer/consumer_api_python/check_windows.bat
index 1b0ade3d5..4e9b1fa1e 100644
--- a/tests/automatic/consumer/consumer_api_python/check_windows.bat
+++ b/tests/automatic/consumer/consumer_api_python/check_windows.bat
@@ -27,13 +27,13 @@ set PYTHONPATH=%1
 echo | set /p dummyName="hello1" > %source_path%\1
 echo | set /p dummyName="hello1" > %source_path%\1_1
 
-python %3/consumer_api.py 127.0.0.1:8400 %source_path% %beamtime_id%  %token_test_run%  single || goto :error
+python %3/consumer_api.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run%  single || goto :error
 
 echo db.dropDatabase() | %mongo_exe% %database_name%
 
 for /l %%x in (1, 1, 10) do echo db.data_default.insert({"_id":%%x,"size":3,"images":[{"_id":1, "size":6,"name":"%%x_1","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}},{"_id":2, "size":6,"name":"%%x_2","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}},{"_id":3, "size":6,"name":"%%x_3","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}}]}) | %mongo_exe% %database_name%  || goto :error
 
-python %3/consumer_api.py 127.0.0.1:8400 %source_path% %beamtime_id%  %token_test_run% datasets || goto :error
+python %3/consumer_api.py 127.0.0.1:8400 tcp %source_path% %beamtime_id%  %token_test_run% datasets || goto :error
 
 
 goto :clean
diff --git a/tests/automatic/consumer/consumer_api_python/consumer_api.py b/tests/automatic/consumer/consumer_api_python/consumer_api.py
index 706828c68..9a491dcea 100644
--- a/tests/automatic/consumer/consumer_api_python/consumer_api.py
+++ b/tests/automatic/consumer/consumer_api_python/consumer_api.py
@@ -4,6 +4,7 @@ import asapo_consumer
 import json
 import sys
 
+
 def exit_on_noerr(name):
     print (name)
     sys.exit(1)
@@ -197,10 +198,10 @@ def check_dataset(broker,group_id_new):
     else:
         exit_on_noerr("get_next_dataset4 err")
 
-source, path, beamtime, token, mode = sys.argv[1:]
+source, network_type, path, beamtime, token, mode = sys.argv[1:]
 
-broker = asapo_consumer.create_server_broker(source,path,True, beamtime,"",token,60000)
-broker_fts = asapo_consumer.create_server_broker(source,path,False, beamtime,"",token,60000)
+broker = asapo_consumer.create_server_broker(source,path,True, beamtime,"",token,60000,network_type)
+broker_fts = asapo_consumer.create_server_broker(source,path,False, beamtime,"",token,60000,network_type)
 
 group_id_new = broker.generate_group_id()
 
@@ -214,4 +215,4 @@ if mode == "datasets":
     check_dataset(broker,group_id_new)
 
 print ("tests done")
-sys.exit(0)
\ No newline at end of file
+sys.exit(0)
diff --git a/tests/automatic/consumer/next_multithread_broker/check_linux.sh b/tests/automatic/consumer/next_multithread_broker/check_linux.sh
index b4a6c53c9..bb15a380e 100644
--- a/tests/automatic/consumer/next_multithread_broker/check_linux.sh
+++ b/tests/automatic/consumer/next_multithread_broker/check_linux.sh
@@ -28,6 +28,6 @@ do
 	echo 'db.data_default.insert({"_id":'$i',"size":100,"name":"'$i'","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}})' | mongo ${database_name}
 done
 
-$@ 127.0.0.1:8400 test_run 4 10 $token_test_run
+$@ 127.0.0.1:8400 tcp test_run 4 10 $token_test_run
 
 
diff --git a/tests/automatic/consumer/next_multithread_broker/check_windows.bat b/tests/automatic/consumer/next_multithread_broker/check_windows.bat
index 4c4bb2e68..275660dd2 100644
--- a/tests/automatic/consumer/next_multithread_broker/check_windows.bat
+++ b/tests/automatic/consumer/next_multithread_broker/check_windows.bat
@@ -7,7 +7,7 @@ call start_services.bat
 for /l %%x in (1, 1, 10) do echo db.data_default.insert({"_id":%%x,"size":100,"name":"%%x","lastchange":1,"source":"none","buf_id":0,"meta":{"test":10}}) | %mongo_exe% %database_name%  || goto :error
 
 
-%1 127.0.0.1:8400 test_run 4 10 %token_test_run% || goto :error
+%1 127.0.0.1:8400 tcp test_run 4 10 %token_test_run% || goto :error
 
 goto :clean
 
diff --git a/tests/automatic/curl_http_client/curl_http_client_command/check_linux.sh b/tests/automatic/curl_http_client/curl_http_client_command/check_linux.sh
index 406b111aa..b42023c8a 100644
--- a/tests/automatic/curl_http_client/curl_http_client_command/check_linux.sh
+++ b/tests/automatic/curl_http_client/curl_http_client_command/check_linux.sh
@@ -23,7 +23,7 @@ echo -n hello > $file_transfer_folder/aaa
 
 dd if=/dev/urandom of=$file_transfer_folder/random bs=1 count=100000
 
-$1  127.0.0.1:5007 127.0.0.1:5008 $file_transfer_folder
+$1  127.0.0.1:5007 tcp 127.0.0.1:5008 $file_transfer_folder
 cat bbb | tee /dev/stderr | grep hello
 diff -q random $file_transfer_folder/random
 
diff --git a/tests/automatic/curl_http_client/curl_http_client_command/check_windows.bat b/tests/automatic/curl_http_client/curl_http_client_command/check_windows.bat
index 7aab2755c..bee5675e2 100644
--- a/tests/automatic/curl_http_client/curl_http_client_command/check_windows.bat
+++ b/tests/automatic/curl_http_client/curl_http_client_command/check_windows.bat
@@ -15,7 +15,7 @@ echo | set /p dummyName="hello" > %file_transfer_folder%\aaa
 
 python3 -c "import os;fout=open('%file_transfer_folder%\\random', 'wb');fout.write(os.urandom(100000))"
 
-"%1"  127.0.0.1:5007 127.0.0.1:5008 %file_transfer_folder%   || goto :error
+"%1"  127.0.0.1:5007 tcp 127.0.0.1:5008 %file_transfer_folder%   || goto :error
 
 type bbb | findstr /c:"hello"  || goto :error
 
diff --git a/tests/automatic/full_chain/send_recv_substreams/CMakeLists.txt b/tests/automatic/full_chain/send_recv_substreams/CMakeLists.txt
index 2eff50082..7ddfbbfbe 100644
--- a/tests/automatic/full_chain/send_recv_substreams/CMakeLists.txt
+++ b/tests/automatic/full_chain/send_recv_substreams/CMakeLists.txt
@@ -11,5 +11,5 @@ set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
 
 prepare_asapo()
 
-add_script_test("${TARGET_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}" nomem)
+add_script_test("${TARGET_NAME}-tcp" "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME} tcp" nomem)
 
diff --git a/tests/automatic/full_chain/send_recv_substreams/check_linux.sh b/tests/automatic/full_chain/send_recv_substreams/check_linux.sh
index d5200e403..11acb1162 100644
--- a/tests/automatic/full_chain/send_recv_substreams/check_linux.sh
+++ b/tests/automatic/full_chain/send_recv_substreams/check_linux.sh
@@ -13,6 +13,8 @@ set -e
 
 trap Cleanup EXIT
 
+network_type=$2
+
 Cleanup() {
     set +e
     nomad stop nginx
@@ -27,9 +29,9 @@ Cleanup() {
 nomad run nginx.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run authorizer.nmd
 
 
-$1 127.0.0.1:8400 $beamtime_id $token > out
+$1 127.0.0.1:8400 $network_type $beamtime_id $token > out
 cat out
diff --git a/tests/automatic/full_chain/send_recv_substreams/check_windows.bat b/tests/automatic/full_chain/send_recv_substreams/check_windows.bat
index d89ca68c8..aa3d9d960 100644
--- a/tests/automatic/full_chain/send_recv_substreams/check_windows.bat
+++ b/tests/automatic/full_chain/send_recv_substreams/check_windows.bat
@@ -12,7 +12,7 @@ SET mongo_exe="c:\Program Files\MongoDB\Server\4.2\bin\mongo.exe"
 
 call start_services.bat
 
-"%1" 127.0.0.1:8400 %beamtime_id% %token%
+"%1" 127.0.0.1:8400 "%2" %beamtime_id% %token%
 
 goto :clean
 
diff --git a/tests/automatic/full_chain/send_recv_substreams/send_recv_substreams.cpp b/tests/automatic/full_chain/send_recv_substreams/send_recv_substreams.cpp
index 3b901888d..3fa8a1b7a 100644
--- a/tests/automatic/full_chain/send_recv_substreams/send_recv_substreams.cpp
+++ b/tests/automatic/full_chain/send_recv_substreams/send_recv_substreams.cpp
@@ -73,7 +73,7 @@ int main(int argc, char* argv[]) {
     Args args;
     if (argc != 5) {
         std::cout << "Usage: " + std::string{argv[0]}
-                  + " <server>  <beamtime_id> <token>"
+                  + " <server> <network_type> <beamtime_id> <token>"
                   <<
                   std::endl;
         exit(EXIT_FAILURE);
diff --git a/tests/automatic/full_chain/send_recv_substreams_python/CMakeLists.txt b/tests/automatic/full_chain/send_recv_substreams_python/CMakeLists.txt
index 4312c3ca1..10a9c04a6 100644
--- a/tests/automatic/full_chain/send_recv_substreams_python/CMakeLists.txt
+++ b/tests/automatic/full_chain/send_recv_substreams_python/CMakeLists.txt
@@ -11,4 +11,4 @@ endif()
 
 file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/send_recv_substreams.py TEST_SCRIPT )
 
-add_script_test("${TARGET_NAME}" "${Python_EXECUTABLE} ${PYTHON_LIBS_CONSUMER} ${PYTHON_LIBS_PRODUCER} ${TEST_SCRIPT} " nomem)
+add_script_test("${TARGET_NAME}-tcp" "${Python_EXECUTABLE} ${PYTHON_LIBS_CONSUMER} ${PYTHON_LIBS_PRODUCER} ${TEST_SCRIPT} tcp" nomem)
diff --git a/tests/automatic/full_chain/send_recv_substreams_python/check_linux.sh b/tests/automatic/full_chain/send_recv_substreams_python/check_linux.sh
index 34bc1850b..d33ffb364 100644
--- a/tests/automatic/full_chain/send_recv_substreams_python/check_linux.sh
+++ b/tests/automatic/full_chain/send_recv_substreams_python/check_linux.sh
@@ -13,6 +13,8 @@ set -e
 
 trap Cleanup EXIT
 
+network_type=$5
+
 Cleanup() {
     set +e
     nomad stop nginx
@@ -27,11 +29,11 @@ Cleanup() {
 nomad run nginx.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run authorizer.nmd
 
 
 export PYTHONPATH=$2:$3:${PYTHONPATH}
 
 
-$1 $4 127.0.0.1:8400 $beamtime_id $token
+$1 $4 127.0.0.1:8400 $network_type $beamtime_id $token
diff --git a/tests/automatic/full_chain/send_recv_substreams_python/check_windows.bat b/tests/automatic/full_chain/send_recv_substreams_python/check_windows.bat
index 475943c37..35313f6ba 100644
--- a/tests/automatic/full_chain/send_recv_substreams_python/check_windows.bat
+++ b/tests/automatic/full_chain/send_recv_substreams_python/check_windows.bat
@@ -12,7 +12,7 @@ SET mongo_exe="c:\Program Files\MongoDB\Server\4.2\bin\mongo.exe"
 
 call start_services.bat
 
-"%1" 127.0.0.1:8400 %beamtime_id% %token%
+"%1" 127.0.0.1:8400 "%5" %beamtime_id% %token%
 
 goto :clean
 
diff --git a/tests/automatic/full_chain/send_recv_substreams_python/send_recv_substreams.py b/tests/automatic/full_chain/send_recv_substreams_python/send_recv_substreams.py
index 60ad65264..2ba5b4bca 100644
--- a/tests/automatic/full_chain/send_recv_substreams_python/send_recv_substreams.py
+++ b/tests/automatic/full_chain/send_recv_substreams_python/send_recv_substreams.py
@@ -3,10 +3,8 @@ from __future__ import print_function
 import asapo_consumer
 import asapo_producer
 import sys
-import os
-
-
 import threading
+
 lock = threading.Lock()
 
 timeout = 10 * 1000
@@ -25,9 +23,9 @@ def callback(header,err):
         print ("successfuly sent: ",header)
     lock.release()
 
-source, beamtime, token = sys.argv[1:]
+source, network_type, beamtime, token = sys.argv[1:]
 
-broker = asapo_consumer.create_server_broker(source,".",True, beamtime,"",token,timeout)
+broker = asapo_consumer.create_server_broker(source,".",True, beamtime,"",token,timeout,network_type)
 producer  = asapo_producer.create_producer(source,beamtime,'auto', "", token, 1, 600)
 producer.set_log_level("debug")
 
diff --git a/tests/automatic/full_chain/simple_chain/CMakeLists.txt b/tests/automatic/full_chain/simple_chain/CMakeLists.txt
index 1f7374efe..ddb11f8a8 100644
--- a/tests/automatic/full_chain/simple_chain/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain/CMakeLists.txt
@@ -4,4 +4,8 @@ set(TARGET_NAME full_chain_simple_chain)
 # Testing
 ################################
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
+
+if (ENABLE_LIBFABRIC)
+    add_script_test("${TARGET_NAME}-fabric" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> fabric" nomem)
+endif()
diff --git a/tests/automatic/full_chain/simple_chain/check_linux.sh b/tests/automatic/full_chain/simple_chain/check_linux.sh
old mode 100644
new mode 100755
index 10e5accc1..c0aecc7eb
--- a/tests/automatic/full_chain/simple_chain/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -39,18 +44,18 @@ echo "db.dropDatabase()" | mongo ${beamtime_id}_detector
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id} 100 1000 4 0 100
+$producer_bin localhost:8400 ${beamtime_id} 100 1000 4 0 100
 #producerid=`echo $!`
 
-
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 5000 1 > out
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 5000 1 | tee out
 cat out
-cat out   | grep "Processed 1000 file(s)"
+cat out | grep "Processed 1000 file(s)"
diff --git a/tests/automatic/full_chain/simple_chain/check_windows.bat b/tests/automatic/full_chain/simple_chain/check_windows.bat
index fd9244556..8a131a4da 100644
--- a/tests/automatic/full_chain/simple_chain/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain/check_windows.bat
@@ -21,7 +21,7 @@ start /B "" "%1" %proxy_address% %beamtime_id% 100 1000 4 0 100
 ping 1.0.0.0 -n 1 -w 100 > nul
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 5000  1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 5000  1 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 1000 file(s)"  out.txt || goto :error
 
diff --git a/tests/automatic/full_chain/simple_chain_dataset/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_dataset/CMakeLists.txt
index c66bfad61..cf7580f6e 100644
--- a/tests/automatic/full_chain/simple_chain_dataset/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_dataset/CMakeLists.txt
@@ -4,4 +4,4 @@ set(TARGET_NAME full_chain_simple_chain_dataset)
 # Testing
 ################################
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_dataset/check_linux.sh b/tests/automatic/full_chain/simple_chain_dataset/check_linux.sh
index cd32be6d2..ef78b0f41 100644
--- a/tests/automatic/full_chain/simple_chain_dataset/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_dataset/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -35,20 +40,18 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id} 100 100 4 0 100 5 &
-
-
+$producer_bin localhost:8400 ${beamtime_id} 100 100 4 0 100 5 &
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 5000 1 1 > out
-cat out
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 5000 1 1 | tee out
 cat out   | grep "Processed 100 dataset(s)"
 cat out   | grep "with 500 file(s)"
 
diff --git a/tests/automatic/full_chain/simple_chain_dataset/check_windows.bat b/tests/automatic/full_chain/simple_chain_dataset/check_windows.bat
index e1273b939..ec20845c9 100644
--- a/tests/automatic/full_chain/simple_chain_dataset/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_dataset/check_windows.bat
@@ -20,7 +20,7 @@ start /B "" "%1" %proxy_address% %beamtime_id% 100 100 4 0 100 5
 ping 1.0.0.0 -n 1 -w 100 > nul
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 5000 1 1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 5000 1 1 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 100 dataset(s)"  out.txt || goto :error
 findstr /i /l /c:"with 500 file(s)"  out.txt || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_filegen/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_filegen/CMakeLists.txt
index 768562c03..8bd0d723e 100644
--- a/tests/automatic/full_chain/simple_chain_filegen/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_filegen/CMakeLists.txt
@@ -12,4 +12,4 @@ endif()
 
 configure_file(test.json.in test.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_filegen/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen/check_linux.sh
index 4a560c00a..8f1f34581 100644
--- a/tests/automatic/full_chain/simple_chain_filegen/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_filegen/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -38,15 +43,15 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 test.json &
+$producer_bin test.json &
 producerid=`echo $!`
 
 sleep 1
@@ -55,7 +60,8 @@ echo hello > /tmp/asapo/test_in/test1/file1
 echo hello > /tmp/asapo/test_in/test1/file2
 echo hello > /tmp/asapo/test_in/test2/file2
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 1000 1 | tee /dev/stderr | grep "Processed 3 file(s)"
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 1000 1 | tee /dev/stderr | grep "Processed 3 file(s)"
 
 test ! -f /tmp/asapo/test_in/test1/file1
 test ! -f /tmp/asapo/test_in/test1/file2
diff --git a/tests/automatic/full_chain/simple_chain_filegen/check_windows.bat b/tests/automatic/full_chain/simple_chain_filegen/check_windows.bat
index 500e19ccd..2db77cfb9 100644
--- a/tests/automatic/full_chain/simple_chain_filegen/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_filegen/check_windows.bat
@@ -34,7 +34,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 1000  1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 1000  1 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 3 file(s)"  out.txt || goto :error
 
diff --git a/tests/automatic/full_chain/simple_chain_filegen_batches/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_filegen_batches/CMakeLists.txt
index c319a11ec..6a8d10614 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_batches/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_filegen_batches/CMakeLists.txt
@@ -12,4 +12,4 @@ endif()
 
 configure_file(test.json.in test.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_filegen_batches/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen_batches/check_linux.sh
index 6b0e8f42b..e745aaabc 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_batches/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_filegen_batches/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -39,15 +44,15 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 test.json &
+$producer_bin test.json &
 producerid=`echo $!`
 
 sleep 1
@@ -56,8 +61,8 @@ echo hello > /tmp/asapo/test_in/test1/file1
 echo hello > /tmp/asapo/test_in/test1/file2
 echo hello > /tmp/asapo/test_in/test2/file2
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 2000 1 1 > out
-cat out
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 2000 1 1 | tee out
 cat out   | grep "Processed 1 dataset(s)"
 cat out   | grep "with 3 file(s)"
 
diff --git a/tests/automatic/full_chain/simple_chain_filegen_batches/check_windows.bat b/tests/automatic/full_chain/simple_chain_filegen_batches/check_windows.bat
index 5c5e7017f..5a17e1393 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_batches/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_filegen_batches/check_windows.bat
@@ -34,7 +34,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 1000 1 1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 1000 1 1 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 1 dataset(s)"  out.txt || goto :error
 findstr /i /l /c:"with 3 file(s)"  out.txt || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_filegen_multisource/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_filegen_multisource/CMakeLists.txt
index 16d6a270f..bd3159a78 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_multisource/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_filegen_multisource/CMakeLists.txt
@@ -15,4 +15,4 @@ configure_file(test.json.in test1.json @ONLY)
 SET (ID 2)
 configure_file(test.json.in test2.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_filegen_multisource/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen_multisource/check_linux.sh
index bcc11e563..526aba56a 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_multisource/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_filegen_multisource/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -40,20 +45,21 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
 mkdir -p ${receiver_folder}
-#producer1
-$1 test1.json &
+
+echo "Start producer 1"
+$producer_bin test1.json &
 producerid1=`echo $!`
-#producer2
-$1 test2.json &
-producerid2=`echo $!`
 
+echo "Start producer 2"
+$producer_bin test2.json &
+producerid2=`echo $!`
 
 sleep 1
 
@@ -62,7 +68,7 @@ echo hello > /tmp/asapo/test_in/test1/file2
 echo hello > /tmp/asapo/test_in/test2/file1
 echo hello > /tmp/asapo/test_in/test2/file2
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 2000 1 1 > out
-cat out
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 2000 1 1 | tee out
 cat out   | grep "Processed 2 dataset(s)"
 cat out   | grep "with 4 file(s)"
diff --git a/tests/automatic/full_chain/simple_chain_filegen_multisource/check_windows.bat b/tests/automatic/full_chain/simple_chain_filegen_multisource/check_windows.bat
index a8cf16700..918ebbef3 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_multisource/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_filegen_multisource/check_windows.bat
@@ -40,7 +40,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 1000 1 1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 1000 1 1 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 2 dataset(s)"  out.txt || goto :error
 findstr /i /l /c:"with 4 file(s)"  out.txt || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/CMakeLists.txt
index 7acab0298..88c78aa10 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/CMakeLists.txt
@@ -13,4 +13,8 @@ endif()
 
 configure_file(test.json.in test.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
+
+if (ENABLE_LIBFABRIC)
+    add_script_test("${TARGET_NAME}-fabric" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> fabric" nomem)
+endif()
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh
index e23dd713f..adbae687c 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh
@@ -4,6 +4,11 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
 token=`$3 token -secret auth_secret.key $beamtime_id`
 
@@ -40,15 +45,15 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 test.json &
+$producer_bin test.json &
 producerid=`echo $!`
 
 sleep 1
@@ -57,8 +62,8 @@ echo -n hello1 > /tmp/asapo/test_in/test1/file1
 echo -n hello2 > /tmp/asapo/test_in/test1/file2
 echo -n hello3 > /tmp/asapo/test_in/test2/file2
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 1000 0 > out.txt
-cat out.txt
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 1000 0 | tee out.txt
 grep "Processed 3 file(s)" out.txt
 grep "hello1" out.txt
 grep "hello2" out.txt
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_windows.bat b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_windows.bat
index 1e3fcd210..d83c34511 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_windows.bat
@@ -34,7 +34,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address%  %receiver_folder% %beamtime_id% 2 %token% 1000 0 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 1000 0 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 3 file(s)" out.txt || goto :error
 findstr /i /l /c:"hello1" out.txt || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/CMakeLists.txt
index b5bfac21e..c54130a4a 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/CMakeLists.txt
@@ -13,4 +13,4 @@ endif()
 
 configure_file(test.json.in test.json @ONLY)
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:event-monitor-producer-bin> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_linux.sh
index b0ea5b8c1..0212ef329 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -39,15 +44,15 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 test.json &
+$producer_bin test.json &
 producerid=`echo $!`
 
 sleep 1
@@ -56,8 +61,8 @@ echo -n hello1 > /tmp/asapo/test_in/test1/file1
 echo -n hello2 > /tmp/asapo/test_in/test1/file2
 echo -n hello3 > /tmp/asapo/test_in/test2/file2
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 1000 0 > out.txt
-cat out.txt
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 1000 0 | tee out.txt
 grep "Processed 3 file(s)" out.txt
 grep "hello1" out.txt
 grep "hello2" out.txt
diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_windows.bat b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_windows.bat
index dc674898e..d83c34511 100644
--- a/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_file/check_windows.bat
@@ -34,7 +34,7 @@ ping 1.0.0.0 -n 10 -w 100 > nul
 
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 1000 0 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 1000 0 > out.txt
 type out.txt
 findstr /i /l /c:"Processed 3 file(s)" out.txt || goto :error
 findstr /i /l /c:"hello1" out.txt || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_metadata/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_metadata/CMakeLists.txt
index 4ac8f929a..dfc7e117e 100644
--- a/tests/automatic/full_chain/simple_chain_metadata/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_metadata/CMakeLists.txt
@@ -4,4 +4,4 @@ set(TARGET_NAME full_chain_simple_chain_meta)
 # Testing
 ################################
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_metadata/check_linux.sh b/tests/automatic/full_chain/simple_chain_metadata/check_linux.sh
index 9927a1974..34d5eda32 100644
--- a/tests/automatic/full_chain/simple_chain_metadata/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_metadata/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -35,16 +40,16 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 1
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id} 100 0 1 0 1000
+$producer_bin localhost:8400 ${beamtime_id} 100 0 1 0 1000
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 1000 1 > out
-cat out
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 1000 1 | tee out
 cat out | grep "dummy_meta"
diff --git a/tests/automatic/full_chain/simple_chain_metadata/check_windows.bat b/tests/automatic/full_chain/simple_chain_metadata/check_windows.bat
index 9dbba7db3..030dcec92 100644
--- a/tests/automatic/full_chain/simple_chain_metadata/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_metadata/check_windows.bat
@@ -18,7 +18,7 @@ mkdir %receiver_folder%
 "%1" %proxy_address% %beamtime_id% 100 0 1 0 1000
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id% 2 %token% 5000  1 > out.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id% 2 %token% 5000  1 > out.txt
 type out.txt
 findstr /i /l /c:"dummy_meta"  out.txt || goto :error
 
diff --git a/tests/automatic/full_chain/simple_chain_usermeta_python/CMakeLists.txt b/tests/automatic/full_chain/simple_chain_usermeta_python/CMakeLists.txt
index 956e8dea6..6ef2935a3 100644
--- a/tests/automatic/full_chain/simple_chain_usermeta_python/CMakeLists.txt
+++ b/tests/automatic/full_chain/simple_chain_usermeta_python/CMakeLists.txt
@@ -12,4 +12,4 @@ else()
 endif()
 
 
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_PROPERTY:asapo,EXENAME> ${CMAKE_CURRENT_SOURCE_DIR} ${PYTHON_LIBS} ${Python_EXECUTABLE}" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_PROPERTY:asapo,EXENAME> ${CMAKE_CURRENT_SOURCE_DIR} ${PYTHON_LIBS} ${Python_EXECUTABLE} tcp" nomem)
diff --git a/tests/automatic/full_chain/simple_chain_usermeta_python/check_linux.sh b/tests/automatic/full_chain/simple_chain_usermeta_python/check_linux.sh
index 8c50be866..3a64f5856 100644
--- a/tests/automatic/full_chain/simple_chain_usermeta_python/check_linux.sh
+++ b/tests/automatic/full_chain/simple_chain_usermeta_python/check_linux.sh
@@ -4,8 +4,12 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+asapo_tool_bin=$2
+network_type=$6
+
 beamtime_id=asapo_test
-token=`$2 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -35,21 +39,20 @@ echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo ${beamtime_id}_detec
 
 nomad run nginx.nmd
 nomad run authorizer.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_${network_type}.nmd
 nomad run discovery.nmd
 nomad run broker.nmd
 
 sleep 2
 
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id} 100 100 1 0 100
+$producer_bin localhost:8400 ${beamtime_id} 100 100 1 0 100
 
 export PYTHONPATH=$4:${PYTHONPATH}
 export Python_EXECUTABLE=$5
 
-
-$Python_EXECUTABLE $3/get_user_meta.py $proxy_address $receiver_folder $beamtime_id $token new > out
-cat out
+echo "Start python consumer in $network_type mode"
+$Python_EXECUTABLE $3/get_user_meta.py $proxy_address $network_type $receiver_folder $beamtime_id $token new | tee out
 cat out | grep "found images: 100"
 cat out | grep "test100"
diff --git a/tests/automatic/full_chain/simple_chain_usermeta_python/check_windows.bat b/tests/automatic/full_chain/simple_chain_usermeta_python/check_windows.bat
index 3fc487795..35b072e06 100644
--- a/tests/automatic/full_chain/simple_chain_usermeta_python/check_windows.bat
+++ b/tests/automatic/full_chain/simple_chain_usermeta_python/check_windows.bat
@@ -21,7 +21,7 @@ mkdir %receiver_folder%
 REM consumer
 set PYTHONPATH=%4
 
-python3 %3/get_user_meta.py %proxy_address%  %receiver_folder% %beamtime_id%  %token% new > out
+python3 %3/get_user_meta.py %proxy_address% "%6" %receiver_folder% %beamtime_id%  %token% new > out
 type out
 type out | findstr /c:"found images: 100" || goto :error
 type out | findstr /c:"test100" || goto :error
diff --git a/tests/automatic/full_chain/simple_chain_usermeta_python/get_user_meta.py b/tests/automatic/full_chain/simple_chain_usermeta_python/get_user_meta.py
index 5fb497e04..b72fbbea3 100644
--- a/tests/automatic/full_chain/simple_chain_usermeta_python/get_user_meta.py
+++ b/tests/automatic/full_chain/simple_chain_usermeta_python/get_user_meta.py
@@ -1,12 +1,11 @@
 from __future__ import print_function
 
 import asapo_consumer
-import json
 import sys
 
-source, path, beamtime, token, group_id = sys.argv[1:]
+source, network_type, path, beamtime, token, group_id = sys.argv[1:]
 
-broker = asapo_consumer.create_server_broker(source,path,True, beamtime,"",token,60000)
+broker = asapo_consumer.create_server_broker(source,path,True, beamtime,"",token,60000,network_type)
 
 images = broker.query_images("meta.user_meta regexp 'test*' order by _id")
 
diff --git a/tests/automatic/full_chain/two_beamlines/CMakeLists.txt b/tests/automatic/full_chain/two_beamlines/CMakeLists.txt
index 5a352cfc7..6b3d480a5 100644
--- a/tests/automatic/full_chain/two_beamlines/CMakeLists.txt
+++ b/tests/automatic/full_chain/two_beamlines/CMakeLists.txt
@@ -4,4 +4,4 @@ set(TARGET_NAME full_chain_two_beamlines)
 # Testing
 ################################
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/two_beamlines/check_linux.sh b/tests/automatic/full_chain/two_beamlines/check_linux.sh
index 085acee5e..472f98e7d 100644
--- a/tests/automatic/full_chain/two_beamlines/check_linux.sh
+++ b/tests/automatic/full_chain/two_beamlines/check_linux.sh
@@ -4,13 +4,18 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 stream=detector
 
 beamtime_id1=asapo_test1
-token1=`$3 token -secret auth_secret.key $beamtime_id1`
+token1=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id1`
 
 beamtime_id2=asapo_test2
-token2=`$3 token -secret auth_secret.key $beamtime_id2`
+token2=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id2`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -51,13 +56,13 @@ nomad run broker.nmd
 
 sleep 3
 
-#producer
+echo "Start producers"
 mkdir -p ${receiver_folder1}
 mkdir -p ${receiver_folder2}
-$1 localhost:8400 ${beamtime_id1} 100 1000 4 0 100 &
-$1 localhost:8400 ${beamtime_id2} 100 900 4 0 100 &
+$producer_bin localhost:8400 ${beamtime_id1} 100 1000 4 0 100 &
+$producer_bin localhost:8400 ${beamtime_id2} 100 900 4 0 100 &
 #producerid=`echo $!`
 
-#consumers
-$2 ${proxy_address} ${receiver_folder1} ${beamtime_id1} 2 $token1 12000 0  | tee /dev/stderr | grep "Processed 1000 file(s)"
-$2 ${proxy_address} ${receiver_folder2} ${beamtime_id2} 2 $token2 12000 0 | tee /dev/stderr | grep "Processed 900 file(s)"
+echo "Start consumers in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder1} ${beamtime_id1} 2 $token1 12000 0  | tee /dev/stderr | grep "Processed 1000 file(s)"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder2} ${beamtime_id2} 2 $token2 12000 0 | tee /dev/stderr | grep "Processed 900 file(s)"
diff --git a/tests/automatic/full_chain/two_beamlines/check_windows.bat b/tests/automatic/full_chain/two_beamlines/check_windows.bat
index b0c525914..cc8f94fe5 100644
--- a/tests/automatic/full_chain/two_beamlines/check_windows.bat
+++ b/tests/automatic/full_chain/two_beamlines/check_windows.bat
@@ -33,11 +33,11 @@ start /B "" "%1" %proxy_address% %beamtime_id2% 100 900 4 0 100
 ping 1.0.0.0 -n 1 -w 100 > nul
 
 REM consumer
-"%2" %proxy_address% %receiver_folder1% %beamtime_id1% 2 %token1% 12000  0 > out1.txt
+"%2" %proxy_address% "%4" %receiver_folder1% %beamtime_id1% 2 %token1% 12000  0 > out1.txt
 type out1.txt
 findstr /i /l /c:"Processed 1000 file(s)"  out1.txt || goto :error
 
-"%2" %proxy_address% %receiver_folder2% %beamtime_id2% 2 %token2% 12000  0 > out2.txt
+"%2" %proxy_address% "%4" %receiver_folder2% %beamtime_id2% 2 %token2% 12000  0 > out2.txt
 type out2.txt
 findstr /i /l /c:"Processed 900 file(s)"  out2.txt || goto :error
 
diff --git a/tests/automatic/full_chain/two_streams/CMakeLists.txt b/tests/automatic/full_chain/two_streams/CMakeLists.txt
index 35ce65b50..505c1ff22 100644
--- a/tests/automatic/full_chain/two_streams/CMakeLists.txt
+++ b/tests/automatic/full_chain/two_streams/CMakeLists.txt
@@ -4,4 +4,4 @@ set(TARGET_NAME full_chain_two_streams)
 # Testing
 ################################
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/full_chain/two_streams/check_linux.sh b/tests/automatic/full_chain/two_streams/check_linux.sh
index eac8e3c4c..be07a78bd 100644
--- a/tests/automatic/full_chain/two_streams/check_linux.sh
+++ b/tests/automatic/full_chain/two_streams/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 stream1=s1
 stream2=s2
@@ -44,12 +49,11 @@ nomad run broker.nmd
 
 sleep 3
 
-#producer
+echo "Start producers"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id}%${stream1} 100 1000 4 0 100 &
-$1 localhost:8400 ${beamtime_id}%${stream2} 100 900 4 0 100 &
-
+$producer_bin localhost:8400 ${beamtime_id}%${stream1} 100 1000 4 0 100 &
+$producer_bin localhost:8400 ${beamtime_id}%${stream2} 100 900 4 0 100 &
 
-#consumers
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id}%${stream1} 2 $token 10000 0  | tee /dev/stderr | grep "Processed 1000 file(s)"
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id}%${stream2} 2 $token 10000 0 | tee /dev/stderr | grep "Processed 900 file(s)"
+echo "Start consumers in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id}%${stream1} 2 $token 10000 0  | tee /dev/stderr | grep "Processed 1000 file(s)"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id}%${stream2} 2 $token 10000 0 | tee /dev/stderr | grep "Processed 900 file(s)"
diff --git a/tests/automatic/full_chain/two_streams/check_windows.bat b/tests/automatic/full_chain/two_streams/check_windows.bat
index fd2b9268d..89dcd5dc4 100644
--- a/tests/automatic/full_chain/two_streams/check_windows.bat
+++ b/tests/automatic/full_chain/two_streams/check_windows.bat
@@ -24,11 +24,11 @@ start /B "" "%1" %proxy_address% %beamtime_id%%%%stream2% 100 900 4 0 100
 ping 1.0.0.0 -n 1 -w 100 > nul
 
 REM consumer
-"%2" %proxy_address% %receiver_folder% %beamtime_id%%%%stream1% 2 %token% 12000  0 > out1.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id%%%%stream1% 2 %token% 12000  0 > out1.txt
 type out1.txt
 findstr /i /l /c:"Processed 1000 file(s)"  out1.txt || goto :error
 
-"%2" %proxy_address% %receiver_folder% %beamtime_id%%%%stream2% 2 %token% 12000  0 > out2.txt
+"%2" %proxy_address% "%4" %receiver_folder% %beamtime_id%%%%stream2% 2 %token% 12000  0 > out2.txt
 type out2.txt
 findstr /i /l /c:"Processed 900 file(s)"  out2.txt || goto :error
 
diff --git a/tests/automatic/high_avail/broker_mongo_restart/CMakeLists.txt b/tests/automatic/high_avail/broker_mongo_restart/CMakeLists.txt
index 0ba1d0de4..244d25220 100644
--- a/tests/automatic/high_avail/broker_mongo_restart/CMakeLists.txt
+++ b/tests/automatic/high_avail/broker_mongo_restart/CMakeLists.txt
@@ -5,4 +5,4 @@ set(TARGET_NAME broker_mongo_restart)
 ################################
 set(RECEIVER_WRITE_TO_DISK false)
 prepare_asapo()
-add_script_test("${TARGET_NAME}" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME>" nomem)
+add_script_test("${TARGET_NAME}-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> tcp" nomem)
diff --git a/tests/automatic/high_avail/broker_mongo_restart/check_linux.sh b/tests/automatic/high_avail/broker_mongo_restart/check_linux.sh
index 6e59dc8f2..0f455e620 100755
--- a/tests/automatic/high_avail/broker_mongo_restart/check_linux.sh
+++ b/tests/automatic/high_avail/broker_mongo_restart/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT SIGHUP SIGINT SIGTERM
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$4
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -79,15 +84,15 @@ sleep 1
 echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo --port 27016 ${beamtime_id}_detector
 
 
-
-#producer
+echo "Start producer"
 mkdir -p ${receiver_folder}
-$1 localhost:8400 ${beamtime_id} 100 1000 4 0 100 &
+$producer_bin localhost:8400 ${beamtime_id} 100 1000 4 0 100 &
 producerid=`echo $!`
 
 wait
 
-$2 ${proxy_address} ${receiver_folder} ${beamtime_id} 2 $token 10000 0 &> output.txt &
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type ${receiver_folder} ${beamtime_id} 2 $token 10000 0 &> output.txt &
 workerid=`echo $!`
 
 sleep 2
diff --git a/tests/automatic/high_avail/services_restart/CMakeLists.txt b/tests/automatic/high_avail/services_restart/CMakeLists.txt
index 145bef8ee..b62a7b6f9 100644
--- a/tests/automatic/high_avail/services_restart/CMakeLists.txt
+++ b/tests/automatic/high_avail/services_restart/CMakeLists.txt
@@ -5,5 +5,5 @@ set(TARGET_NAME service_restart)
 ################################
 set(RECEIVER_WRITE_TO_DISK false)
 prepare_asapo()
-add_script_test("${TARGET_NAME}-all" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> broker 1000 998" nomem)
-add_script_test("${TARGET_NAME}-all-but-broker" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> receiver_tcp 1000 1000" nomem)
+add_script_test("${TARGET_NAME}-all-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> broker 1000 998 tcp" nomem)
+add_script_test("${TARGET_NAME}-all-but-broker-tcp" "$<TARGET_FILE:dummy-data-producer> $<TARGET_FILE:getnext_broker> $<TARGET_PROPERTY:asapo,EXENAME> receiver 1000 1000 tcp" nomem)
diff --git a/tests/automatic/high_avail/services_restart/check_linux.sh b/tests/automatic/high_avail/services_restart/check_linux.sh
index 8fbbed131..434e13eb1 100644
--- a/tests/automatic/high_avail/services_restart/check_linux.sh
+++ b/tests/automatic/high_avail/services_restart/check_linux.sh
@@ -4,8 +4,13 @@ set -e
 
 trap Cleanup EXIT
 
+producer_bin=$1
+consumer_bin=$2
+asapo_tool_bin=$3
+network_type=$7
+
 beamtime_id=asapo_test
-token=`$3 token -secret auth_secret.key $beamtime_id`
+token=`$asapo_tool_bin token -secret auth_secret.key $beamtime_id`
 
 monitor_database_name=db_test
 proxy_address=127.0.0.1:8400
@@ -36,15 +41,12 @@ sleep 1
 
 echo "db.${beamtime_id}_detector.insert({dummy:1})" | mongo  ${beamtime_id}_detector
 
-
-
-#producer
-$1 localhost:8400 ${beamtime_id} 100 $5 4 0 100 &
+echo "Start producer"
+$producer_bin localhost:8400 ${beamtime_id} 100 $5 4 0 100 &
 #producerid=`echo $!`
 
-
-#consumer
-$2 ${proxy_address} dummy_path ${beamtime_id} 2 $token 30000 1 &> output.txt &
+echo "Start consumer in $network_type mode"
+$consumer_bin ${proxy_address} $network_type dummy_path ${beamtime_id} 2 $token 30000 1 &> output.txt &
 
 sleep 1
 
@@ -58,9 +60,13 @@ nomad stop receiver
 nomad run nginx.nmd
 nomad run authorizer.nmd
 nomad run discovery.nmd
-nomad run receiver_tcp.nmd
+nomad run receiver_$7.nmd
 
-nomad run $4.nmd
+if ["$4" = "receiver"]; then
+  nomad run $4_$7.nmd
+else
+  nomad run $4.nmd
+fi
 
 wait
 
diff --git a/tests/manual/python_tests/consumer/consumer_api.py b/tests/manual/python_tests/consumer/consumer_api.py
index 0aa14cb8d..b11cb9907 100644
--- a/tests/manual/python_tests/consumer/consumer_api.py
+++ b/tests/manual/python_tests/consumer/consumer_api.py
@@ -3,8 +3,8 @@ from __future__ import print_function
 import asapo_consumer
 import sys
 
-source, path,beamtime, token = sys.argv[1:]
-broker = asapo_consumer.create_server_broker(source,path,False, beamtime,"",token,1000)
+source, network_type, path, beamtime, token = sys.argv[1:]
+broker = asapo_consumer.create_server_broker(source,path,False, beamtime,"",token,1000,network_type)
 group_id = broker.generate_group_id()
 
 
@@ -17,4 +17,4 @@ print (meta)
 print (len(data),data[0:100])
 data.tofile("out")
 
-sys.exit(0)
\ No newline at end of file
+sys.exit(0)
diff --git a/tests/manual/python_tests/consumer/test.sh b/tests/manual/python_tests/consumer/test.sh
index 6b5254e86..b093b5757 100644
--- a/tests/manual/python_tests/consumer/test.sh
+++ b/tests/manual/python_tests/consumer/test.sh
@@ -1 +1 @@
-python3 consumer_api.py asapo-services.desy.de:8400 asapo_test /shared_data/test_facility/gpfs/test/2019/data/asapo_test KmUDdacgBzaOD3NIJvN1NmKGqWKtx0DK-NyPjdpeWkc=
\ No newline at end of file
+python3 consumer_api.py asapo-services.desy.de:8400 tcp asapo_test /shared_data/test_facility/gpfs/test/2019/data/asapo_test KmUDdacgBzaOD3NIJvN1NmKGqWKtx0DK-NyPjdpeWkc=
diff --git a/tests/manual/python_tests/consumer/test_asap3.sh b/tests/manual/python_tests/consumer/test_asap3.sh
index 6f43030a3..1f22a9782 100755
--- a/tests/manual/python_tests/consumer/test_asap3.sh
+++ b/tests/manual/python_tests/consumer/test_asap3.sh
@@ -1,3 +1,3 @@
 export PYTHONPATH=/Users/yakubov/projects/asapo/cmake-build-debug/consumer/api/python
 export token=KmUDdacgBzaOD3NIJvN1NmKGqWKtx0DK-NyPjdpeWkc=
-python3 consumer_api.py asap3-utl.desy.de:8400 /gpfs/asapo/shared/test_dir/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token
+python3 consumer_api.py asap3-utl.desy.de:8400 tcp /gpfs/asapo/shared/test_dir/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token
diff --git a/tests/manual/python_tests/consumer/test_k8s.sh b/tests/manual/python_tests/consumer/test_k8s.sh
index 3cd69a940..fc1052a55 100755
--- a/tests/manual/python_tests/consumer/test_k8s.sh
+++ b/tests/manual/python_tests/consumer/test_k8s.sh
@@ -1,4 +1,4 @@
 export PYTHONPATH=/Users/yakubov/projects/asapo/cmake-build-debug/consumer/api/python
 export token=IEfwsWa0GXky2S3MkxJSUHJT1sI8DD5teRdjBUXVRxk=
-python3 consumer_api.py gest-k8s-test2.desy.de/yakser /test_offline/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token
-#python3 getnext.py gest-k8s-test2.desy.de/yakser /test_offline/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token new
\ No newline at end of file
+python3 consumer_api.py tcp gest-k8s-test2.desy.de/yakser /test_offline/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token
+#python3 getnext.py gest-k8s-test2.desy.de/yakser /test_offline/test_facility/gpfs/test/2019/data/asapo_test asapo_test $token new
-- 
GitLab