I have a code similar to the one below transforming a PCollections of Protocol Buffer messages. Because some of them are pretty big I want to not only test it using for equality but also print where's the difference.
I want to use https://google.github.io/truth/fuzzy tests which offer to print a difference.
PCollection<PbMsg1> p1 = ...;
List<PbMsg1> p2 = loadFixture();
PAssert.that(p1).containsInAnyOrder(output.getUserReqList());
The question is either:
- How to use custom diff / compare function in PAssert?
- How to convert from a PCollection to List?
Aucun commentaire:
Enregistrer un commentaire