Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
savoirfairelinux
jami-daemon
Commits
d1415674
Commit
d1415674
authored
5 years ago
by
Mohamed Fenjiro
Browse files
Options
Downloads
Patches
Plain Diff
jami_test.py fixes
Change-Id: If4c13f20b1bbf2e0cf9c6e78ffe4d68b99e98842
parent
6b0d81f4
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
tools/dringctrl/errorsDring.py
+0
-0
0 additions, 0 deletions
tools/dringctrl/errorsDring.py
tools/dringctrl/jami_test.py
+27
-17
27 additions, 17 deletions
tools/dringctrl/jami_test.py
with
27 additions
and
17 deletions
tools/dringctrl/errors.py
→
tools/dringctrl/errors
Dring
.py
+
0
−
0
View file @
d1415674
File moved
This diff is collapsed.
Click to expand it.
tools/dringctrl/jami_test.py
+
27
−
17
View file @
d1415674
...
...
@@ -39,22 +39,30 @@ class JamiTest(DRingCtrl):
self
.
failureRate
=
0
self
.
callsCompleted
=
0
ringAccounts
=
self
.
getAllAccounts
(
'
RING
'
)
if
len
(
ringAccounts
)
<
1
:
callerDetails
=
{
'
Account.type
'
:
'
RING
'
,
'
Account.alias
'
:
'
testringaccount3
'
}
self
.
addAccount
(
callerDetails
)
self
.
setAccount
(
ringAccounts
[
0
])
volatileCallerDetails
=
self
.
getVolatileAccountDetails
(
self
.
account
)
if
not
args
.
peer
:
peer
=
ringAccounts
[
1
]
details
=
self
.
getAccountDetails
(
peer
)
self
.
peer
=
details
[
'
Account.username
'
]
else
:
self
.
peer
=
args
.
peer
if
volatileCallerDetails
[
'
Account.registrationStatus
'
]
!=
'
REGISTERED
'
:
raise
DRingCtrlError
(
"
Caller Account not registered
"
)
self
.
peer
=
args
.
peer
volatilePeerDetails
=
self
.
getVolatileAccountDetails
()
print
(
"
Using local test account:
"
,
self
.
account
)
print
(
"
Using test peer:
"
,
self
.
peer
)
if
volatilePeerDetails
[
'
Account.registrationStatus
'
]
!=
'
REGISTERED
'
:
raise
DRingCtrlError
(
"
Peer Account not registered
"
)
print
(
"
Using local test account:
"
,
self
.
account
,
volatileCallerDetails
[
'
Account.registrationStatus
'
])
print
(
"
Using test peer:
"
,
self
.
peer
,
volatilePeerDetails
[
'
Account.registrationStatus
'
])
if
self
.
testCall
():
GLib
.
timeout_add_seconds
(
args
.
interval
,
self
.
testCall
)
def
keepGoing
(
self
):
return
self
.
args
.
calls
==
0
or
self
.
iterator
<
self
.
args
.
calls
return
not
self
.
args
.
calls
or
self
.
iterator
<
self
.
args
.
calls
def
testCall
(
self
):
print
(
"
**[BEGIN] Call Test
"
)
...
...
@@ -94,7 +102,7 @@ class JamiTest(DRingCtrl):
def
testSucceeded
(
self
,
callId
):
self
.
testEnded
(
callId
)
def
run
(
self
):
super
().
run
()
if
self
.
failureCount
==
0
:
...
...
@@ -107,13 +115,15 @@ class JamiTest(DRingCtrl):
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
description
=
'
Monitor Jami reliabilty by mesuring failure rate for making Calls/Messages and receiving them.
'
)
parser
.
add_argument
(
'
--messages
'
,
help
=
'
Number of messages sent
'
,
type
=
int
)
parser
.
add_argument
(
'
--calls
'
,
help
=
'
Number of calls made
'
,
default
=
0
,
type
=
int
)
parser
.
add_argument
(
'
--duration
'
,
help
=
'
Specify the duration of the test (seconds)
'
,
default
=
10
,
type
=
int
)
parser
.
add_argument
(
'
--interval
'
,
help
=
'
Specify the test interval (seconds)
'
,
default
=
0
,
type
=
int
)
parser
.
add_argument
(
'
--peer
'
,
help
=
'
Specify the peer account id
'
)
optional
=
parser
.
_action_groups
.
pop
()
required
=
parser
.
add_argument_group
(
'
required arguments
'
)
optional
.
add_argument
(
'
--messages
'
,
help
=
'
Number of messages to send
'
,
type
=
int
)
optional
.
add_argument
(
'
--duration
'
,
help
=
'
Specify the duration of the test (seconds)
'
,
default
=
600
,
type
=
int
)
optional
.
add_argument
(
'
--interval
'
,
help
=
'
Specify the test interval (seconds)
'
,
default
=
10
,
type
=
int
)
required
.
add_argument
(
'
--peer
'
,
help
=
'
Specify the peer account ID
'
,
required
=
True
)
required
.
add_argument
(
'
--calls
'
,
help
=
'
Number of calls to make
'
,
type
=
int
,
required
=
True
)
parser
.
_action_groups
.
append
(
optional
)
args
=
parser
.
parse_args
()
test
=
JamiTest
(
"
test
"
,
args
)
test
.
run
()
\ No newline at end of file
test
.
run
()
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