Skip to content

Commit

Permalink
TCK Challenge: RepeatedCasterResource#send fixes #1196
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Nov 29, 2023
1 parent 77e78fc commit 6953620
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
target/
.classpath
.factorypath
.project
.settings/
*.iml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -633,8 +633,6 @@ public void closeTest() throws Fault {
source.open();
sleepUntilHolderGetsFilled(holder);
assertNotNull(holder.get(), "Message was not received");
for (InboundSseEvent e : holder)
logMsg("Received message no", e.readData());

// check the session is opened
setProperty(Property.REQUEST, buildRequest(Request.GET, "repeat/isopen"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -54,10 +54,10 @@ public void run() {
isOpen = !sink.isClosed();
}
while (!sink.isClosed() && cast) {
sink.send(sse.newEvent(String.valueOf(cnt++)));
try {
Thread.sleep(500L);
} catch (InterruptedException e1) {
sink.send(sse.newEvent(String.valueOf(cnt++)));
Thread.sleep(1L);
} catch (Exception e1) {
cast = false;
}
synchronized (isOpen) {
Expand Down

0 comments on commit 6953620

Please sign in to comment.