Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
CaosDB Python Integration Tests
Commits
63c8db1f
Unverified
Commit
63c8db1f
authored
4 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: Test for server issue 99.
Warning: may cause an infinite loop with output in one server thread.
parent
43bf8fb4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_issues_server.py
+28
-0
28 additions, 0 deletions
tests/test_issues_server.py
with
28 additions
and
0 deletions
tests/test_issues_server.py
+
28
−
0
View file @
63c8db1f
...
...
@@ -24,6 +24,10 @@
"""
Tests for issues on gitlab.com, project caosdb-server.
"""
import
os
import
tempfile
import
time
import
caosdb
as
db
from
caosdb.exceptions
import
EntityError
,
TransactionError
import
pytest
...
...
@@ -137,3 +141,27 @@ def test_issue_85_b():
C
.
update
()
C
.
add_parent
(
A
)
C
.
update
()
# Failed at this step
def
test_issue_99
():
"""
Checksum updating failed with versioning enabled.
"""
# Using files in extroot, because this allows us to update the file content from the outside.
local_dir
=
os
.
path
.
join
(
db
.
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_insert_files_in_dir.local
"
),
"
test_issue_99
"
)
docker_dir
=
os
.
path
.
join
(
db
.
get_config
().
get
(
"
IntegrationTests
"
,
"
test_files.test_insert_files_in_dir.server
"
),
"
test_issue_99
"
)
with
tempfile
.
NamedTemporaryFile
(
dir
=
local_dir
)
as
file_99
:
# Create File entity in CaosDB
c
=
db
.
Container
()
c
.
insert
(
unique
=
False
,
raise_exception_on_error
=
False
,
flags
=
{
"
InsertFilesInDir
"
:
docker_dir
})
dbfile
=
c
[
0
]
# Checksum should exist after a short time
time
.
sleep
(
0.5
)
dbfile
.
retrieve
()
assert
dbfile
.
checksum
is
not
None
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