Skip to content

Commit 7c7ffc1

Browse files
committed
external program runner termiting bug fixed
1 parent a8a73c2 commit 7c7ffc1

16 files changed

Lines changed: 31 additions & 41 deletions

File tree

0 Bytes
Binary file not shown.

examples/project-example/NATT.jar

348 Bytes
Binary file not shown.

natt-config-editor/NATT.jar

348 Bytes
Binary file not shown.

natt-vscode-extension/out/extension.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

natt-vscode-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publisher": "0xM4R71N",
66
"repository": "https://github.com/0xMartin/NetworkAppTestingTool",
77
"description": "Test scenario configuration editor for black box network application testing tool.",
8-
"version": "1.2.4",
8+
"version": "1.2.5",
99
"engines": {
1010
"vscode": "^1.91.1"
1111
},
@@ -90,7 +90,7 @@
9090
"properties": {
9191
"yourExtension.nattJarUrl": {
9292
"type": "string",
93-
"default": "https://github.com/0xMartin/NetworkAppTestingTool/releases/download/1.6.3/NATT.jar",
93+
"default": "https://github.com/0xMartin/NetworkAppTestingTool/releases/download/1.6.4/NATT.jar",
9494
"description": "URL for the NATT JAR file"
9595
}
9696
}

natt-vscode-extension/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function activate(context: vscode.ExtensionContext) {
170170
}
171171
// Define the URL and destination path for the JAR file
172172
const config = vscode.workspace.getConfiguration('natt-configuration-editor');
173-
const jarUrl = config.get<string>('nattJarUrl', 'https://github.com/0xMartin/NetworkAppTestingTool/releases/download/1.6.3/NATT.jar');
173+
const jarUrl = config.get<string>('nattJarUrl', 'https://github.com/0xMartin/NetworkAppTestingTool/releases/download/1.6.4/NATT.jar');
174174
const destJarPath = path.join(projectPath, 'NATT.jar');
175175

176176
// Function to download the file

natt/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ task writeVersionProperties {
7777

7878
processResources.dependsOn writeVersionProperties
7979

80-
version = '1.6.3'
80+
version = '1.6.4'
8181
group = 'utb.fai.natt'

natt/libs/natt-spi-1.1.0.jar

0 Bytes
Binary file not shown.

natt/src/main/java/utb/fai/natt/module/ExternalProgramRunner.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,17 @@ public boolean terminateModule() {
102102
try {
103103
outputStream.close();
104104
} catch (IOException e) {
105+
logger.warning(super.getNameForLogger() + "Failed to close output stream!");
105106
}
106107

107108
try {
108109
ProcessManager.removePID(ProcessManager.DEFAULT_FILE, String.valueOf(this.currentPID));
109110
} catch (Exception ex) {
111+
logger.warning(super.getNameForLogger() + "Failed to remove PID from file!");
110112
}
111-
112-
return true;
113113
}
114114

115-
return false;
115+
return this.getContext().removeActiveModule(this.getName());
116116
}
117117

118118
@Override

natt/src/main/java/utb/fai/natt/module/MQTTBroker.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ public void runModule() throws InternalErrorException {
5555

5656
@Override
5757
public boolean terminateModule() {
58-
// odstraneni tohoto modulu z aktivnich modulu
5958
super.setRunning(false);
6059
this.server.stopServer();
6160
logger.info(String.format(super.getNameForLogger() + "MQTT broker [%s] terminated", this.getName()));
62-
return NATTContext.instance().removeActiveModule(this.getName());
61+
return this.getContext().removeActiveModule(this.getName());
6362
}
6463

6564
@Override

0 commit comments

Comments
 (0)