Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Brian O'Connor
2014-10-10 23:12:02 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ea9021ea437b4d41bf14e3f48297ea6576e2b2b4
ea9021ea
1 parent
47c40882
moving latch instation before submit in push-test-intent command
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java
cli/src/main/java/org/onlab/onos/cli/net/IntentPushTestCommand.java
View file @
ea9021e
...
...
@@ -74,6 +74,8 @@ public class IntentPushTestCommand extends AbstractShellCommand
int
count
=
Integer
.
parseInt
(
countString
);
service
.
addListener
(
this
);
latch
=
new
CountDownLatch
(
count
);
start
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
TrafficSelector
s
=
selector
...
...
@@ -87,9 +89,8 @@ public class IntentPushTestCommand extends AbstractShellCommand
egress
);
service
.
submit
(
intent
);
}
latch
=
new
CountDownLatch
(
count
);
try
{
latch
.
await
(
3
,
TimeUnit
.
SECONDS
);
latch
.
await
(
5
,
TimeUnit
.
SECONDS
);
printResults
(
count
);
}
catch
(
InterruptedException
e
)
{
print
(
e
.
toString
());
...
...
@@ -134,7 +135,11 @@ public class IntentPushTestCommand extends AbstractShellCommand
public
void
event
(
IntentEvent
event
)
{
if
(
event
.
type
()
==
Type
.
INSTALLED
)
{
end
=
event
.
time
();
latch
.
countDown
();
if
(
latch
!=
null
)
{
latch
.
countDown
();
}
else
{
log
.
warn
(
"install event latch is null"
);
}
}
}
}
...
...
Please
register
or
login
to post a comment