Skip to content

Commit b7d6c25

Browse files
emmaling27Convex, Inc.
authored andcommitted
limit size of component diffs for proptest (#29490)
Proptests were taking too long, so we limited the test cases to 16. Better to limit the size of the component diffs instead. This took 8s locally. GitOrigin-RevId: 1b1595509da9fbf5dae16843ab891db2b35bc097
1 parent e31eeac commit b7d6c25

File tree

1 file changed

+6
-5
lines changed
  • crates/model/src/deployment_audit_log

1 file changed

+6
-5
lines changed

crates/model/src/deployment_audit_log/types.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ impl TryFrom<SerializedIndexDiff> for AuditLogIndexDiff {
483483
)]
484484
pub struct PushComponentDiffs {
485485
pub auth_diff: AuthDiff,
486+
#[cfg_attr(
487+
any(test, feature = "testing"),
488+
proptest(strategy = "prop::collection::btree_map(any::<ComponentPath>(), \
489+
any::<ComponentDiff>(), 0..4)")
490+
)]
486491
pub component_diffs: BTreeMap<ComponentPath, ComponentDiff>,
487492
}
488493

@@ -546,11 +551,7 @@ impl TryFrom<PushComponentDiffs> for SerializedPushComponentDiffs {
546551
}
547552
}
548553

549-
codegen_convex_serialization!(
550-
PushComponentDiffs,
551-
SerializedPushComponentDiffs,
552-
test_cases = 16
553-
);
554+
codegen_convex_serialization!(PushComponentDiffs, SerializedPushComponentDiffs);
554555

555556
#[cfg(test)]
556557
mod tests {

0 commit comments

Comments
 (0)