Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
ee5a2f1c
Commit
ee5a2f1c
authored
Jan 08, 2020
by
mar-ar
Committed by
oroulet
Jan 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test
parent
45d60960
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
tests/test_connections.py
tests/test_connections.py
+28
-0
No files found.
tests/test_connections.py
0 → 100644
View file @
ee5a2f1c
# coding: utf-8
import
asyncio
import
pytest
from
asyncua
import
Client
from
asyncua.ua.uaerrors
import
BadMaxConnectionsReached
from
.conftest
import
port_num
pytestmark
=
pytest
.
mark
.
asyncio
async
def
test_max_connections_1
(
opc
):
opc
.
server
.
iserver
.
isession
.
__class__
.
max_connections
=
1
port
=
opc
.
server
.
endpoint
.
port
if
port
==
port_num
:
# if client we already have one connection
with
pytest
.
raises
(
BadMaxConnectionsReached
):
async
with
Client
(
f'opc.tcp://127.0.0.1:
{
port
}
'
):
pass
else
:
async
with
Client
(
f'opc.tcp://127.0.0.1:
{
port
}
'
):
with
pytest
.
raises
(
BadMaxConnectionsReached
):
async
with
Client
(
f'opc.tcp://127.0.0.1:
{
port
}
'
):
pass
opc
.
server
.
iserver
.
isession
.
__class__
.
max_connections
=
1000
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment