@@ -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
0 commit comments