Skip to content
Snippets Groups Projects
Commit 6117c9f1 authored by Tim Schoof's avatar Tim Schoof
Browse files

Fix tests

parent 82b6fd49
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment