Skip to content

Commit

Permalink
Improved formatting and removed some unnecessary comments. (apache#6104
Browse files Browse the repository at this point in the history
…).
  • Loading branch information
Devin Bost committed Jan 24, 2020
1 parent a9c966f commit 68c89bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
4 changes: 2 additions & 2 deletions pulsar-function-go/core/pf/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type goInstance struct {
consumers map[string]pulsar.Consumer
client pulsar.Client
lastHealthCheckTs int64
properties map[string]string
properties map[string]string
}

// newGoInstance init goInstance and init function context
Expand All @@ -52,7 +52,7 @@ func newGoInstance() *goInstance {
goInstance.properties = make(map[string]string)
return goInstance
}
func (gi *goInstance) getProperties(){
func (gi *goInstance) getProperties() {
gi.properties["application"] = "pulsar-function"
gi.properties["id"] = gi.context.GetFuncFQFN()
gi.properties["instance_id"] = gi.context.GetFuncID()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,40 +846,6 @@ public void testPythonFunctionLocalRun() throws Exception {
}
@Test(groups = "function")
public void testGoFunctionLocalRun() throws Exception {
/*
Process process = java.lang.Runtime.getRuntime().exec(
"go build ../../pulsar-function-go/pf -o /pulsar/examples/go-examples/go-test-functions.go");
StringBuilder output = new StringBuilder();
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(process.getInputStream()));
BufferedReader stdError = new BufferedReader(new
InputStreamReader(process.getErrorStream()));
// Read the output from the command
System.out.println("Here is the standard output of the command:\n");
String s = null;
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}
// Read any errors from the attempted command
System.out.println("Here is the standard error of the command (if any):\n");
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}
int exitVal = process.waitFor();
if (exitVal == 0) {
System.out.println("Success!");
System.out.println(output);
System.exit(0);
} else {
System.out.println("Failure!");
System.out.println(output);
System.exit(0);
}*/
testFunctionLocalRun(Runtime.GO);
}

Expand Down

0 comments on commit 68c89bd

Please sign in to comment.