mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-15 12:46:53 +00:00
fix(protobuf) Fix test instability by deterministrically selecting field (#4612)
This commit is contained in:
parent
336a628c5b
commit
aa05faad32
@ -73,6 +73,10 @@ public class ProtobufField implements ProtobufElement {
|
||||
return nativeType();
|
||||
}
|
||||
|
||||
public int getNumber() {
|
||||
return fieldProto.getNumber();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String nativeType() {
|
||||
return Optional.ofNullable(nativeType).orElseGet(() -> {
|
||||
|
@ -306,7 +306,7 @@ public class ProtobufGraph extends DefaultDirectedGraph<ProtobufElement, FieldTy
|
||||
.collect(Collectors.toSet());
|
||||
removeVertices.addAll(wrappedPrimitiveFields);
|
||||
|
||||
wrappedPrimitiveFields.forEach(primitiveField -> {
|
||||
wrappedPrimitiveFields.stream().filter(fld -> fld.getNumber() == 1).forEach(primitiveField -> {
|
||||
// remove incoming old edges to primitive
|
||||
removeEdges.addAll(incomingEdgesOf(primitiveField));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user