Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
joram
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
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
joram
joram
Commits
145a63f5
Commit
145a63f5
authored
Jun 05, 2019
by
Andre Freyssinet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix JUnit test issue (
#313987
).
parent
108bf73c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
joram/joram/mom/core/src/test/java/org/objectweb/joram/mom/notifications/TopicForwardNotTest.java
...bjectweb/joram/mom/notifications/TopicForwardNotTest.java
+6
-0
joram/joram/mom/core/src/test/java/org/objectweb/joram/mom/proxies/MessageIdListImplEncodingTest.java
...tweb/joram/mom/proxies/MessageIdListImplEncodingTest.java
+18
-9
No files found.
joram/joram/mom/core/src/test/java/org/objectweb/joram/mom/notifications/TopicForwardNotTest.java
View file @
145a63f5
...
...
@@ -57,7 +57,13 @@ public class TopicForwardNotTest {
ClientMessages
clientMessages
=
new
ClientMessages
(
1
,
2
);
clientMessages
.
addMessage
(
sharedMsg
);
// Verify that the message is added
Assert
.
assertEquals
(
clientMessages
.
getMessageCount
(),
1
);
Assert
.
assertEquals
(
clientMessages
.
getClientContext
(),
1
);
Assert
.
assertEquals
(
clientMessages
.
getRequestId
(),
2
);
clientMessages
.
setProxyId
(
new
AgentId
((
short
)
1
,
(
short
)
2
,
3
));
Assert
.
assertEquals
(
clientMessages
.
getProxyId
(),
new
AgentId
((
short
)
1
,
(
short
)
2
,
3
));
TopicForwardNot
topicForwardNot
=
new
TopicForwardNot
(
clientMessages
,
false
);
checkEncoding
(
topicForwardNot
);
...
...
joram/joram/mom/core/src/test/java/org/objectweb/joram/mom/proxies/MessageIdListImplEncodingTest.java
View file @
145a63f5
...
...
@@ -24,29 +24,38 @@ package org.objectweb.joram.mom.proxies;
import
junit.framework.Assert
;
import
java.util.Vector
;
import
org.junit.Test
;
import
org.objectweb.joram.mom.util.MessageIdListImpl
;
public
class
MessageIdListImplEncodingTest
{
static
int
lsize
=
3
;
static
Vector
<
String
>
lcontent
=
new
Vector
<
String
>();
@Test
public
void
run
()
throws
Exception
{
EncodingHelper
.
init
();
MessageIdListImpl
list
=
new
MessageIdListImpl
(
"testList"
);
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
list
.
add
(
"msg"
+
i
,
true
);
for
(
int
i
=
0
;
i
<
lsize
;
i
++)
{
String
str
=
"msg"
+
i
;
list
.
add
(
str
,
true
);
lcontent
.
add
(
str
);
}
checkEncoding
(
list
);
// Verify the created list
Assert
.
assertEquals
(
list
.
size
(),
lsize
);
for
(
int
i
=
0
;
i
<
lsize
;
i
++)
{
Assert
.
assertEquals
(
list
.
get
(
i
),
lcontent
.
get
(
i
));
}
// Verify the list after encoding and decoding
checkEncoding
(
list
,
lsize
);
}
private
void
checkEncoding
(
MessageIdListImpl
list
)
throws
Exception
{
private
void
checkEncoding
(
MessageIdListImpl
list
,
int
lsize
)
throws
Exception
{
byte
[]
bytes
=
EncodingHelper
.
encode
(
list
);
MessageIdListImpl
listDec
=
(
MessageIdListImpl
)
EncodingHelper
.
decode
(
list
.
getEncodableClassId
(),
bytes
);
MessageIdListImpl
listDec
=
(
MessageIdListImpl
)
EncodingHelper
.
decode
(
list
.
getEncodableClassId
(),
bytes
);
Assert
.
assertEquals
(
list
.
size
(),
listDec
.
size
());
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
...
...
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