github-actions[bot] commented on code in PR #41734:
URL: https://github.com/apache/beam/pull/41734#discussion_r4726414442
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/testing/PAssert.java:
##########
@@ -1324,6 +1324,12 @@ public Void apply(T actual) {
private static class GroupGlobally<T>
extends PTransform<PCollection<T>,
PCollection<Iterable<ValueInSingleWindow<T>>>>
implements Serializable {
+ /**
+ * The single key all elements are grouped under so the assertion sees
them together. Its value
+ * has no meaning.
+ */
+ private static final int SINGLETON_KEY = 42;
Review Comment:
**🟠High**: Per the original issue context in
[BEAM-1854](https://issues.apache.org/jira/browse/BEAM-1854), the confusion
when debugging `ValidatesRunner` tests comes from seeing the runtime key value
`42` in `KV<Integer, ...>` elements during pipeline execution, rather than the
local variable name in `PAssert.java`.
As suggested by the issue author in BEAM-1854, please replace the integer
`42` with a self-explanatory string constant (e.g., `"PAssert-global-key"`) and
update the corresponding `KV<Integer, ...>` type parameters in
`GroupGlobally#expand` to `KV<String, ...>`.
```suggestion
private static final String SINGLETON_KEY = "PAssert-global-key";
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]