From 6117c9f1d432026e5b8f2b8d6139b7182f65a364 Mon Sep 17 00:00:00 2001
From: Tim Schoof <tim.schoof@desy.de>
Date: Mon, 7 Aug 2023 14:31:22 +0200
Subject: [PATCH] Fix tests

---
 tests/automatic/producer/python_api/check_linux.sh  | 6 +++---
 tests/automatic/producer/python_api/producer_api.py | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/automatic/producer/python_api/check_linux.sh b/tests/automatic/producer/python_api/check_linux.sh
index 51552b6eb..6bef80f4d 100644
--- a/tests/automatic/producer/python_api/check_linux.sh
+++ b/tests/automatic/producer/python_api/check_linux.sh
@@ -27,8 +27,8 @@ echo test > file1
 
 $1 $3 $data_source $beamtime_id  "127.0.0.1:8400" &> out || cat out
 cat out
-echo count successfully send, expect 17
-cat out | grep "successfuly sent" | wc -l | tee /dev/stderr | grep 17
+echo count successfully send, expect 19
+cat out | grep "successfuly sent" | wc -l | tee /dev/stderr | grep 19
 echo count wrong input, expect 11
 cat out | grep "wrong input" | wc -l | tee /dev/stderr | grep 11
 
@@ -39,7 +39,7 @@ cat out | grep "already have record with same id" | wc -l | tee /dev/stderr | gr
 echo count duplicates, expect 6
 cat out | grep "duplicate" | wc -l | tee /dev/stderr | grep 6
 echo count data in callback, expect 6
-cat out | grep "'data':" | wc -l  | tee /dev/stderr | grep 6
+cat out | grep "'data':" | wc -l  | tee /dev/stderr | grep 8
 echo check found local io error
 cat out | grep "local i/o error"
 cat out | grep "Finished successfully"
diff --git a/tests/automatic/producer/python_api/producer_api.py b/tests/automatic/producer/python_api/producer_api.py
index 989014d9c..14f1a18a7 100644
--- a/tests/automatic/producer/python_api/producer_api.py
+++ b/tests/automatic/producer/python_api/producer_api.py
@@ -108,12 +108,12 @@ else:
 
 # send data from read-only array
 read_only_data = np.frombuffer(data.tobytes(), dtype=np.uint8)
-producer.send(11, "processed/" + data_source + "/" + "file5", memoryview(data),
+producer.send(11, "processed/" + data_source + "/" + "file11", memoryview(data),
                    ingest_mode=asapo_producer.DEFAULT_INGEST_MODE, callback=callback)
 
 
 # send data from memoryview
-producer.send(12, "processed/" + data_source + "/" + "file5", memoryview(data),
+producer.send(12, "processed/" + data_source + "/" + "file12", memoryview(data),
                    ingest_mode=asapo_producer.DEFAULT_INGEST_MODE, callback=callback)
 
 
@@ -176,7 +176,7 @@ assert_eq(n, 0, "requests in queue")
 data = np.arange(1000000, dtype=np.float64)
 producer.set_requests_queue_limits(0,1)
 try:
-    producer.send(11, "processed/bla", data)
+    producer.send(13, "processed/bla", data)
 except asapo_producer.AsapoRequestsPoolIsFull as e:
     print(e)
 else:
@@ -201,7 +201,7 @@ assert_eq(no_meta, None, "no meta")
 
 #stream infos
 info = producer.stream_info()
-assert_eq(info['lastId'], 10, "stream_info last id")
+assert_eq(info['lastId'], 12, "stream_info last id")
 assert_eq(info['name'], "default", "stream_info name")
 assert_eq(info['timestampCreated']/1000000000<time.time(),True , "stream_info time created")
 assert_eq(info['timestampCreated']/1000000000>time.time()-10,True , "stream_info time created")
-- 
GitLab