diff --git a/tests/automatic/producer/python_api/check_linux.sh b/tests/automatic/producer/python_api/check_linux.sh index 51552b6eb0ce43d9eb1fd742872b1ab1859d0c95..6bef80f4d18633847bd24c22fc7e19ab922df4ff 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 989014d9ca379329cd4e6312797db1d012ccea58..14f1a18a7f7284afda97927b3f51132ec8a1959c 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")