@@ -26,6 +26,7 @@ public class ExecutionSettings {
2626 false ,
2727 false ,
2828 false ,
29+ false ,
2930 EarlyFlakeDetectionSettings .DEFAULT ,
3031 TestManagementSettings .DEFAULT ,
3132 null ,
@@ -43,6 +44,7 @@ public class ExecutionSettings {
4344 private final boolean testSkippingEnabled ;
4445 private final boolean flakyTestRetriesEnabled ;
4546 private final boolean impactedTestsDetectionEnabled ;
47+ private final boolean failedTestReplayEnabled ;
4648 @ Nonnull private final EarlyFlakeDetectionSettings earlyFlakeDetectionSettings ;
4749 @ Nonnull private final TestManagementSettings testManagementSettings ;
4850 @ Nullable private final String itrCorrelationId ;
@@ -58,6 +60,7 @@ public ExecutionSettings(
5860 boolean testSkippingEnabled ,
5961 boolean flakyTestRetriesEnabled ,
6062 boolean impactedTestsDetectionEnabled ,
63+ boolean failedTestReplayEnabled ,
6164 @ Nonnull EarlyFlakeDetectionSettings earlyFlakeDetectionSettings ,
6265 @ Nonnull TestManagementSettings testManagementSettings ,
6366 @ Nullable String itrCorrelationId ,
@@ -74,6 +77,7 @@ public ExecutionSettings(
7477 this .testSkippingEnabled = testSkippingEnabled ;
7578 this .flakyTestRetriesEnabled = flakyTestRetriesEnabled ;
7679 this .impactedTestsDetectionEnabled = impactedTestsDetectionEnabled ;
80+ this .failedTestReplayEnabled = failedTestReplayEnabled ;
7781 this .earlyFlakeDetectionSettings = earlyFlakeDetectionSettings ;
7882 this .testManagementSettings = testManagementSettings ;
7983 this .itrCorrelationId = itrCorrelationId ;
@@ -110,6 +114,7 @@ private ExecutionSettings(
110114 boolean testSkippingEnabled ,
111115 boolean flakyTestRetriesEnabled ,
112116 boolean impactedTestsDetectionEnabled ,
117+ boolean failedTestReplayEnabled ,
113118 @ Nonnull EarlyFlakeDetectionSettings earlyFlakeDetectionSettings ,
114119 @ Nonnull TestManagementSettings testManagementSettings ,
115120 @ Nullable String itrCorrelationId ,
@@ -123,6 +128,7 @@ private ExecutionSettings(
123128 this .testSkippingEnabled = testSkippingEnabled ;
124129 this .flakyTestRetriesEnabled = flakyTestRetriesEnabled ;
125130 this .impactedTestsDetectionEnabled = impactedTestsDetectionEnabled ;
131+ this .failedTestReplayEnabled = failedTestReplayEnabled ;
126132 this .earlyFlakeDetectionSettings = earlyFlakeDetectionSettings ;
127133 this .testManagementSettings = testManagementSettings ;
128134 this .itrCorrelationId = itrCorrelationId ;
@@ -157,6 +163,10 @@ public boolean isImpactedTestsDetectionEnabled() {
157163 return impactedTestsDetectionEnabled ;
158164 }
159165
166+ public boolean isFailedTestReplayEnabled () {
167+ return failedTestReplayEnabled ;
168+ }
169+
160170 @ Nonnull
161171 public EarlyFlakeDetectionSettings getEarlyFlakeDetectionSettings () {
162172 return earlyFlakeDetectionSettings ;
@@ -243,6 +253,7 @@ public boolean equals(Object o) {
243253 && testSkippingEnabled == that .testSkippingEnabled
244254 && flakyTestRetriesEnabled == that .flakyTestRetriesEnabled
245255 && impactedTestsDetectionEnabled == that .impactedTestsDetectionEnabled
256+ && failedTestReplayEnabled == that .failedTestReplayEnabled
246257 && Objects .equals (earlyFlakeDetectionSettings , that .earlyFlakeDetectionSettings )
247258 && Objects .equals (testManagementSettings , that .testManagementSettings )
248259 && Objects .equals (itrCorrelationId , that .itrCorrelationId )
@@ -261,6 +272,7 @@ public int hashCode() {
261272 testSkippingEnabled ,
262273 flakyTestRetriesEnabled ,
263274 impactedTestsDetectionEnabled ,
275+ failedTestReplayEnabled ,
264276 earlyFlakeDetectionSettings ,
265277 testManagementSettings ,
266278 itrCorrelationId ,
@@ -278,6 +290,7 @@ public static class Serializer {
278290 private static final int TEST_SKIPPING_ENABLED_FLAG = 4 ;
279291 private static final int FLAKY_TEST_RETRIES_ENABLED_FLAG = 8 ;
280292 private static final int IMPACTED_TESTS_DETECTION_ENABLED_FLAG = 16 ;
293+ private static final int FAILED_TEST_REPLAY_ENABLED_FLAG = 32 ;
281294
282295 public static ByteBuffer serialize (ExecutionSettings settings ) {
283296 datadog .trace .civisibility .ipc .serialization .Serializer s =
@@ -291,7 +304,8 @@ public static ByteBuffer serialize(ExecutionSettings settings) {
291304 | (settings .flakyTestRetriesEnabled ? FLAKY_TEST_RETRIES_ENABLED_FLAG : 0 )
292305 | (settings .impactedTestsDetectionEnabled
293306 ? IMPACTED_TESTS_DETECTION_ENABLED_FLAG
294- : 0 ));
307+ : 0 )
308+ | (settings .failedTestReplayEnabled ? FAILED_TEST_REPLAY_ENABLED_FLAG : 0 ));
295309 s .write (flags );
296310
297311 EarlyFlakeDetectionSettings .Serializer .serialize (s , settings .earlyFlakeDetectionSettings );
@@ -330,6 +344,7 @@ public static ExecutionSettings deserialize(ByteBuffer buffer) {
330344 boolean testSkippingEnabled = (flags & TEST_SKIPPING_ENABLED_FLAG ) != 0 ;
331345 boolean flakyTestRetriesEnabled = (flags & FLAKY_TEST_RETRIES_ENABLED_FLAG ) != 0 ;
332346 boolean impactedTestsDetectionEnabled = (flags & IMPACTED_TESTS_DETECTION_ENABLED_FLAG ) != 0 ;
347+ boolean failedTestReplayEnabled = (flags & FAILED_TEST_REPLAY_ENABLED_FLAG ) != 0 ;
333348
334349 EarlyFlakeDetectionSettings earlyFlakeDetectionSettings =
335350 EarlyFlakeDetectionSettings .Serializer .deserialize (buffer );
@@ -372,6 +387,7 @@ public static ExecutionSettings deserialize(ByteBuffer buffer) {
372387 testSkippingEnabled ,
373388 flakyTestRetriesEnabled ,
374389 impactedTestsDetectionEnabled ,
390+ failedTestReplayEnabled ,
375391 earlyFlakeDetectionSettings ,
376392 testManagementSettings ,
377393 itrCorrelationId ,
0 commit comments