Skip to content

Commit bbebe22

Browse files
fix: update sdk to add testSet to dedupData as well
Signed-off-by: Pranshu Srivastava <[email protected]>
1 parent 378a573 commit bbebe22

File tree

3 files changed

+8
-27
lines changed

3 files changed

+8
-27
lines changed

integration/src/main/java/io/keploy/servlet/KeployMiddleware.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
7777
HttpServletResponse response = (HttpServletResponse) servletResponse;
7878

7979
String keploy_test_id = request.getHeader("KEPLOY-TEST-ID");
80+
String keploy_test_set_id = request.getHeader("KEPLOY-TEST-SET-ID");
8081
// logger.debug("KEPLOY-TEST-ID: {}", keploy_test_id);
8182
filterChain.doFilter(request, response);
8283
if (System.getenv("ENABLE_DEDUP") != null) {
@@ -89,7 +90,7 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
8990
// Run getCoverage in a separate thread
9091
// Thread coverageThread = new Thread(() -> {
9192
try {
92-
getCoverage(keploy_test_id);
93+
getCoverage(keploy_test_id, keploy_test_set_id);
9394
} catch (InterruptedException | IOException e) {
9495
throw new RuntimeException(e);
9596
}
@@ -180,7 +181,7 @@ public synchronized void execWriter2(String keploy_test_id) throws IOException {
180181
}
181182
}
182183

183-
public void getCoverage(String keploy_test_id) throws IOException, InterruptedException {
184+
public void getCoverage(String keploy_test_id, String keploy_test_set_id) throws IOException, InterruptedException {
184185

185186
try {
186187
execWriter(keploy_test_id);
@@ -189,7 +190,7 @@ public void getCoverage(String keploy_test_id) throws IOException, InterruptedEx
189190
}
190191

191192
try {
192-
execReader(keploy_test_id);
193+
execReader(keploy_test_id, keploy_test_set_id);
193194
} catch (IOException e) {
194195
e.printStackTrace(); // Example: print the stack trace
195196
}
@@ -200,7 +201,7 @@ public void shutdownExecutor() {
200201
executorService.shutdown();
201202
}
202203

203-
private void execReader(String keploy_test_id) throws IOException {
204+
private void execReader(String keploy_test_id, String keploy_test_set_id) throws IOException {
204205
// Together with the original class definition we can calculate coverage
205206
// information:
206207
out.println("------------------------------------------");
@@ -249,7 +250,7 @@ private void execReader(String keploy_test_id) throws IOException {
249250
// System.out.println("Line_Path: " + Line_Path);
250251

251252
Map<String, Object> testData = new HashMap<>();
252-
testData.put("id", keploy_test_id);
253+
testData.put("id", keploy_test_set_id+ "/" + keploy_test_id);
253254
// Map<String, Object> test1 = createTestData("test-1",testData);
254255
testData.put("executedLinesByFile", executedLinesByFile);
255256

keploy-sdk/pom.xml

-20
Original file line numberDiff line numberDiff line change
@@ -148,26 +148,6 @@
148148
</execution>
149149
</executions>
150150
</plugin>
151-
<plugin>
152-
<groupId>org.apache.maven.plugins</groupId>
153-
<artifactId>maven-gpg-plugin</artifactId>
154-
<version>1.6</version>
155-
<executions>
156-
<execution>
157-
<id>sign-artifacts</id>
158-
<phase>verify</phase>
159-
<goals>
160-
<goal>sign</goal>
161-
</goals>
162-
<configuration>
163-
<gpgArguments>
164-
<arg>--pinentry-mode</arg>
165-
<arg>loopback</arg>
166-
</gpgArguments>
167-
</configuration>
168-
</execution>
169-
</executions>
170-
</plugin>
171151
<plugin>
172152
<groupId>org.codehaus.mojo</groupId>
173153
<artifactId>build-helper-maven-plugin</artifactId>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</execution>
9595
</executions>
9696
</plugin>
97-
<plugin>
97+
<!-- <plugin>
9898
<groupId>org.apache.maven.plugins</groupId>
9999
<artifactId>maven-gpg-plugin</artifactId>
100100
<version>1.5</version>
@@ -107,7 +107,7 @@
107107
</goals>
108108
</execution>
109109
</executions>
110-
</plugin>
110+
</plugin> -->
111111
<plugin>
112112
<groupId>org.apache.maven.plugins</groupId>
113113
<artifactId>maven-javadoc-plugin</artifactId>

0 commit comments

Comments
 (0)