Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
530c46af
Commit
530c46af
authored
May 26, 2010
by
Guillaume Surrel
Browse files
Synchronize countMessages method.
parent
68cfca67
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/src/joram/connector/ConnectorTest1.java
View file @
530c46af
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2007 ScalAgent Distributed Technologies
* Copyright (C) 2007
- 2010
ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -184,7 +184,7 @@ public class ConnectorTest1 extends TestCase {
}
}.
start
();
Thread
.
sleep
(
2
0000
);
// wait onMessage
Thread
.
sleep
(
1
0000
);
// wait onMessage
assertTrue
(
"counter1="
+
counter1
+
" should be 101"
,
counter1
==
101
);
assertTrue
(
"counter2="
+
counter2
+
" should be 101"
,
counter2
==
101
);
assertTrue
(
"counter3="
+
counter3
+
" should be 101"
,
counter3
==
101
);
...
...
@@ -204,7 +204,7 @@ public class ConnectorTest1 extends TestCase {
private
static
int
counter2
=
0
;
private
static
int
counter3
=
0
;
public
static
void
countMessages
(
String
text
)
{
public
static
synchronized
void
countMessages
(
String
text
)
{
if
(
text
==
null
)
return
;
if
(
text
.
startsWith
(
"with queue"
))
{
...
...
Write
Preview
Supports
Markdown
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