Fix how the test looks for the messageId
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3b3d0fd1 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3b3d0fd1 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3b3d0fd1 Branch: refs/heads/master Commit: 3b3d0fd140ccd741253d5c0727d6a264af76d125 Parents: 1b9f011 Author: Daniel Kulp <[email protected]> Authored: Thu Mar 27 01:25:24 2014 -0400 Committer: Daniel Kulp <[email protected]> Committed: Thu Mar 27 09:07:49 2014 -0400 ---------------------------------------------------------------------- .../java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/3b3d0fd1/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java ---------------------------------------------------------------------- diff --git a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java index f404dbe..2a548aa 100644 --- a/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java +++ b/services/ws-discovery/ws-discovery-api/src/test/java/org/apache/cxf/ws/discovery/WSDiscoveryClientTest.java @@ -95,8 +95,9 @@ public final class WSDiscoveryClientTest { s.receive(p); SocketAddress sa = p.getSocketAddress(); String incoming = new String(p.getData(), 0, p.getLength(), "UTF-8"); - int idx = incoming.indexOf("MessageID>"); - incoming = incoming.substring(idx + 10); + int idx = incoming.indexOf("MessageID"); + idx = incoming.indexOf('>', idx); + incoming = incoming.substring(idx + 1); idx = incoming.indexOf("</"); incoming = incoming.substring(0, idx); for (int x = 1; x < 4; x++) {
