Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
asapo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joao Alvim Oliveira Dias De Almeida
asapo
Commits
6117c9f1
Commit
6117c9f1
authored
1 year ago
by
Tim Schoof
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
82b6fd49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/automatic/producer/python_api/check_linux.sh
+3
-3
3 additions, 3 deletions
tests/automatic/producer/python_api/check_linux.sh
tests/automatic/producer/python_api/producer_api.py
+4
-4
4 additions, 4 deletions
tests/automatic/producer/python_api/producer_api.py
with
7 additions
and
7 deletions
tests/automatic/producer/python_api/check_linux.sh
+
3
−
3
View file @
6117c9f1
...
...
@@ -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 1
7
cat
out |
grep
"successfuly sent"
|
wc
-l
|
tee
/dev/stderr |
grep
1
7
echo
count successfully send, expect 1
9
cat
out |
grep
"successfuly sent"
|
wc
-l
|
tee
/dev/stderr |
grep
1
9
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"
This diff is collapsed.
Click to expand it.
tests/automatic/producer/python_api/producer_api.py
+
4
−
4
View file @
6117c9f1
...
...
@@ -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
+
"
/
"
+
"
file
5
"
,
memoryview
(
data
),
producer
.
send
(
11
,
"
processed/
"
+
data_source
+
"
/
"
+
"
file
11
"
,
memoryview
(
data
),
ingest_mode
=
asapo_producer
.
DEFAULT_INGEST_MODE
,
callback
=
callback
)
# send data from memoryview
producer
.
send
(
12
,
"
processed/
"
+
data_source
+
"
/
"
+
"
file
5
"
,
memoryview
(
data
),
producer
.
send
(
12
,
"
processed/
"
+
data_source
+
"
/
"
+
"
file
12
"
,
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
(
1
1
,
"
processed/bla
"
,
data
)
producer
.
send
(
1
3
,
"
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
'
],
1
0
,
"
stream_info last id
"
)
assert_eq
(
info
[
'
lastId
'
],
1
2
,
"
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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment