Skip to content

Commit

Permalink
Revert polling
Browse files Browse the repository at this point in the history
  • Loading branch information
acepero13 committed Jan 7, 2018
1 parent 7bafdb6 commit 1c00501
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 46 deletions.
2 changes: 1 addition & 1 deletion prj/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<target name="debug">

<java classname="de.dfki.vsm.SceneMaker3" fork="true">
<jvmarg line="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"/>
<jvmarg line="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006"/>
<classpath refid="clspath"/>
</java>
</target>
Expand Down
4 changes: 4 additions & 0 deletions src/de/dfki/vsm/xtension/decad/commands/DecadCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ protected void post(PostParametersBuilder parameters) throws IOException, Interr
public void setHttpClient(HttpClient httpClient) {
this.httpClient = httpClient;
}

public String getResponse() {
return httpClient.getResponse();
}
}
12 changes: 0 additions & 12 deletions src/de/dfki/vsm/xtension/decad/utils/DECADLongPoller.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
package de.dfki.vsm.xtension.decad.utils;

import de.dfki.vsm.runtime.activity.executor.ActivityExecutor;
import de.dfki.vsm.xtension.decad.commands.DecadCommand;

public class DECADLongPoller {
public DECADLongPoller(ActivityExecutor fakeExecutor) {

}

public DECADLongPoller(ActivityExecutor fakeExecutor, DecadCommand isSpeakingCommand) {

}

public void startPolling() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void testSpeakToLocalhost() throws InterruptedException, IOException {
PostParametersBuilder parameters = new PostParametersBuilder();
parameters.addParameter("text", "Hello world");
client
.openUrl("http://localhost:5005/speak")
.openUrl("http://localhost:5005/speech/speak")
.post(parameters)
.read();
assertEquals("Speaking...", client.getResponse());
Expand Down
32 changes: 0 additions & 32 deletions tests/de/dfki/vsm/xtension/decad/utils/DECADLongPollerTest.java

This file was deleted.

6 changes: 6 additions & 0 deletions tests/fakes/FakeIsSpeakingCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import de.dfki.vsm.xtension.decad.commands.DecadCommand;

public class FakeIsSpeakingCommand extends DecadCommand {
public boolean isSpeakingResponse;
public FakeIsSpeakingCommand(AbstractActivity activity) {
super(activity);
isSpeakingResponse = false;
}

@Override
Expand All @@ -17,4 +19,8 @@ protected String buildUrl() {
public void execute() {

}

public String getResponse() {
return isSpeakingResponse ? "1" : "0";
}
}

0 comments on commit 1c00501

Please sign in to comment.