ci(tst-03): fix orphan-terminator test on Linux + refresh stale java worker codegen
Two real defects the CI run surfaced (driving to fully green): - OrphanWorkerTerminatorTests hard-coded a Windows path (C:\...); on the Linux runner Path.GetFullPath does not root it, so the terminator's exact-path match found nothing (Expected 2/1 kills, Actual 0). Use an OS-appropriate normalized path so the matching logic is validated on every platform (5/5 pass locally). - clients/java generated MxaccessWorker.java was stale — missing the canonical max_frame_bytes field. Refreshed via `gradle generateProto` (protobuf 4.33.1, the pinned version — the diff is purely the field, no version churn). Broaden the ci.yml churn-revert to both generated aggregates so verify-clean still guards real drift elsewhere. Claude-Session: https://claude.ai/code/session_01DMXXvNuPekkkrTEyPNxEkW
This commit is contained in:
@@ -112,7 +112,11 @@ jobs:
|
|||||||
working-directory: clients/java
|
working-directory: clients/java
|
||||||
run: gradle test
|
run: gradle test
|
||||||
- name: Revert spurious protobuf-version churn (no .proto changed)
|
- name: Revert spurious protobuf-version churn (no .proto changed)
|
||||||
run: git checkout -- clients/java/src/main/generated/main/java/mxaccess_gateway/v1/MxaccessGateway.java || true
|
# Both generated aggregates can pick up protobuf-runtime-version churn on regen; revert
|
||||||
|
# both so verify-clean still catches a real, uncommitted proto/codegen change elsewhere.
|
||||||
|
run: |
|
||||||
|
git checkout -- clients/java/src/main/generated/main/java/mxaccess_gateway/v1/MxaccessGateway.java || true
|
||||||
|
git checkout -- clients/java/src/main/generated/main/java/mxaccess_worker/v1/MxaccessWorker.java || true
|
||||||
- name: Verify generated tree is clean
|
- name: Verify generated tree is clean
|
||||||
run: git diff --exit-code -- clients/java/src/main/generated
|
run: git diff --exit-code -- clients/java/src/main/generated
|
||||||
|
|
||||||
|
|||||||
@@ -3789,6 +3789,20 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
*/
|
*/
|
||||||
com.google.protobuf.ByteString
|
com.google.protobuf.ByteString
|
||||||
getGatewayVersionBytes();
|
getGatewayVersionBytes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Maximum worker-frame payload size, in bytes, negotiated by the gateway from its
|
||||||
|
* configured pipe limit. The worker adopts this as its frame-protocol MaxMessageBytes
|
||||||
|
* instead of a hard-coded default; 0 (an older gateway that never set the field) means
|
||||||
|
* "use the worker's built-in default". Sits above the public gRPC cap by an
|
||||||
|
* envelope-overhead margin so an accepted gRPC payload always fits one worker frame.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <code>uint32 max_frame_bytes = 4;</code>
|
||||||
|
* @return The maxFrameBytes.
|
||||||
|
*/
|
||||||
|
int getMaxFrameBytes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code mxaccess_worker.v1.GatewayHello}
|
* Protobuf type {@code mxaccess_worker.v1.GatewayHello}
|
||||||
@@ -3918,6 +3932,25 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int MAX_FRAME_BYTES_FIELD_NUMBER = 4;
|
||||||
|
private int maxFrameBytes_ = 0;
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Maximum worker-frame payload size, in bytes, negotiated by the gateway from its
|
||||||
|
* configured pipe limit. The worker adopts this as its frame-protocol MaxMessageBytes
|
||||||
|
* instead of a hard-coded default; 0 (an older gateway that never set the field) means
|
||||||
|
* "use the worker's built-in default". Sits above the public gRPC cap by an
|
||||||
|
* envelope-overhead margin so an accepted gRPC payload always fits one worker frame.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <code>uint32 max_frame_bytes = 4;</code>
|
||||||
|
* @return The maxFrameBytes.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getMaxFrameBytes() {
|
||||||
|
return maxFrameBytes_;
|
||||||
|
}
|
||||||
|
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -3941,6 +3974,9 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayVersion_)) {
|
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayVersion_)) {
|
||||||
com.google.protobuf.GeneratedMessage.writeString(output, 3, gatewayVersion_);
|
com.google.protobuf.GeneratedMessage.writeString(output, 3, gatewayVersion_);
|
||||||
}
|
}
|
||||||
|
if (maxFrameBytes_ != 0) {
|
||||||
|
output.writeUInt32(4, maxFrameBytes_);
|
||||||
|
}
|
||||||
getUnknownFields().writeTo(output);
|
getUnknownFields().writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3960,6 +3996,10 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayVersion_)) {
|
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayVersion_)) {
|
||||||
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, gatewayVersion_);
|
size += com.google.protobuf.GeneratedMessage.computeStringSize(3, gatewayVersion_);
|
||||||
}
|
}
|
||||||
|
if (maxFrameBytes_ != 0) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeUInt32Size(4, maxFrameBytes_);
|
||||||
|
}
|
||||||
size += getUnknownFields().getSerializedSize();
|
size += getUnknownFields().getSerializedSize();
|
||||||
memoizedSize = size;
|
memoizedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -3981,6 +4021,8 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
.equals(other.getNonce())) return false;
|
.equals(other.getNonce())) return false;
|
||||||
if (!getGatewayVersion()
|
if (!getGatewayVersion()
|
||||||
.equals(other.getGatewayVersion())) return false;
|
.equals(other.getGatewayVersion())) return false;
|
||||||
|
if (getMaxFrameBytes()
|
||||||
|
!= other.getMaxFrameBytes()) return false;
|
||||||
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3998,6 +4040,8 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
hash = (53 * hash) + getNonce().hashCode();
|
hash = (53 * hash) + getNonce().hashCode();
|
||||||
hash = (37 * hash) + GATEWAY_VERSION_FIELD_NUMBER;
|
hash = (37 * hash) + GATEWAY_VERSION_FIELD_NUMBER;
|
||||||
hash = (53 * hash) + getGatewayVersion().hashCode();
|
hash = (53 * hash) + getGatewayVersion().hashCode();
|
||||||
|
hash = (37 * hash) + MAX_FRAME_BYTES_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getMaxFrameBytes();
|
||||||
hash = (29 * hash) + getUnknownFields().hashCode();
|
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||||
memoizedHashCode = hash;
|
memoizedHashCode = hash;
|
||||||
return hash;
|
return hash;
|
||||||
@@ -4132,6 +4176,7 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
supportedProtocolVersion_ = 0;
|
supportedProtocolVersion_ = 0;
|
||||||
nonce_ = "";
|
nonce_ = "";
|
||||||
gatewayVersion_ = "";
|
gatewayVersion_ = "";
|
||||||
|
maxFrameBytes_ = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4174,6 +4219,9 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
if (((from_bitField0_ & 0x00000004) != 0)) {
|
if (((from_bitField0_ & 0x00000004) != 0)) {
|
||||||
result.gatewayVersion_ = gatewayVersion_;
|
result.gatewayVersion_ = gatewayVersion_;
|
||||||
}
|
}
|
||||||
|
if (((from_bitField0_ & 0x00000008) != 0)) {
|
||||||
|
result.maxFrameBytes_ = maxFrameBytes_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@java.lang.Override
|
@java.lang.Override
|
||||||
@@ -4201,6 +4249,9 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000004;
|
||||||
onChanged();
|
onChanged();
|
||||||
}
|
}
|
||||||
|
if (other.getMaxFrameBytes() != 0) {
|
||||||
|
setMaxFrameBytes(other.getMaxFrameBytes());
|
||||||
|
}
|
||||||
this.mergeUnknownFields(other.getUnknownFields());
|
this.mergeUnknownFields(other.getUnknownFields());
|
||||||
onChanged();
|
onChanged();
|
||||||
return this;
|
return this;
|
||||||
@@ -4242,6 +4293,11 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000004;
|
||||||
break;
|
break;
|
||||||
} // case 26
|
} // case 26
|
||||||
|
case 32: {
|
||||||
|
maxFrameBytes_ = input.readUInt32();
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
break;
|
||||||
|
} // case 32
|
||||||
default: {
|
default: {
|
||||||
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||||
done = true; // was an endgroup tag
|
done = true; // was an endgroup tag
|
||||||
@@ -4435,6 +4491,62 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int maxFrameBytes_ ;
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Maximum worker-frame payload size, in bytes, negotiated by the gateway from its
|
||||||
|
* configured pipe limit. The worker adopts this as its frame-protocol MaxMessageBytes
|
||||||
|
* instead of a hard-coded default; 0 (an older gateway that never set the field) means
|
||||||
|
* "use the worker's built-in default". Sits above the public gRPC cap by an
|
||||||
|
* envelope-overhead margin so an accepted gRPC payload always fits one worker frame.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <code>uint32 max_frame_bytes = 4;</code>
|
||||||
|
* @return The maxFrameBytes.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getMaxFrameBytes() {
|
||||||
|
return maxFrameBytes_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Maximum worker-frame payload size, in bytes, negotiated by the gateway from its
|
||||||
|
* configured pipe limit. The worker adopts this as its frame-protocol MaxMessageBytes
|
||||||
|
* instead of a hard-coded default; 0 (an older gateway that never set the field) means
|
||||||
|
* "use the worker's built-in default". Sits above the public gRPC cap by an
|
||||||
|
* envelope-overhead margin so an accepted gRPC payload always fits one worker frame.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <code>uint32 max_frame_bytes = 4;</code>
|
||||||
|
* @param value The maxFrameBytes to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setMaxFrameBytes(int value) {
|
||||||
|
|
||||||
|
maxFrameBytes_ = value;
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Maximum worker-frame payload size, in bytes, negotiated by the gateway from its
|
||||||
|
* configured pipe limit. The worker adopts this as its frame-protocol MaxMessageBytes
|
||||||
|
* instead of a hard-coded default; 0 (an older gateway that never set the field) means
|
||||||
|
* "use the worker's built-in default". Sits above the public gRPC cap by an
|
||||||
|
* envelope-overhead margin so an accepted gRPC payload always fits one worker frame.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <code>uint32 max_frame_bytes = 4;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearMaxFrameBytes() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
|
maxFrameBytes_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:mxaccess_worker.v1.GatewayHello)
|
// @@protoc_insertion_point(builder_scope:mxaccess_worker.v1.GatewayHello)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12552,64 +12664,65 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
"rker_heartbeat\030\023 \001(\0132#.mxaccess_worker.v" +
|
"rker_heartbeat\030\023 \001(\0132#.mxaccess_worker.v" +
|
||||||
"1.WorkerHeartbeatH\000\0227\n\014worker_fault\030\024 \001(" +
|
"1.WorkerHeartbeatH\000\0227\n\014worker_fault\030\024 \001(" +
|
||||||
"\0132\037.mxaccess_worker.v1.WorkerFaultH\000B\006\n\004" +
|
"\0132\037.mxaccess_worker.v1.WorkerFaultH\000B\006\n\004" +
|
||||||
"body\"Z\n\014GatewayHello\022\"\n\032supported_protoc" +
|
"body\"s\n\014GatewayHello\022\"\n\032supported_protoc" +
|
||||||
"ol_version\030\001 \001(\r\022\r\n\005nonce\030\002 \001(\t\022\027\n\017gatew" +
|
"ol_version\030\001 \001(\r\022\r\n\005nonce\030\002 \001(\t\022\027\n\017gatew" +
|
||||||
"ay_version\030\003 \001(\t\"i\n\013WorkerHello\022\030\n\020proto" +
|
"ay_version\030\003 \001(\t\022\027\n\017max_frame_bytes\030\004 \001(" +
|
||||||
"col_version\030\001 \001(\r\022\r\n\005nonce\030\002 \001(\t\022\031\n\021work" +
|
"\r\"i\n\013WorkerHello\022\030\n\020protocol_version\030\001 \001" +
|
||||||
"er_process_id\030\003 \001(\005\022\026\n\016worker_version\030\004 " +
|
"(\r\022\r\n\005nonce\030\002 \001(\t\022\031\n\021worker_process_id\030\003" +
|
||||||
"\001(\t\"\216\001\n\013WorkerReady\022\031\n\021worker_process_id" +
|
" \001(\005\022\026\n\016worker_version\030\004 \001(\t\"\216\001\n\013WorkerR" +
|
||||||
"\030\001 \001(\005\022\027\n\017mxaccess_progid\030\002 \001(\t\022\026\n\016mxacc" +
|
"eady\022\031\n\021worker_process_id\030\001 \001(\005\022\027\n\017mxacc" +
|
||||||
"ess_clsid\030\003 \001(\t\0223\n\017ready_timestamp\030\004 \001(\013" +
|
"ess_progid\030\002 \001(\t\022\026\n\016mxaccess_clsid\030\003 \001(\t" +
|
||||||
"2\032.google.protobuf.Timestamp\"w\n\rWorkerCo" +
|
"\0223\n\017ready_timestamp\030\004 \001(\0132\032.google.proto" +
|
||||||
"mmand\022/\n\007command\030\001 \001(\0132\036.mxaccess_gatewa" +
|
"buf.Timestamp\"w\n\rWorkerCommand\022/\n\007comman" +
|
||||||
"y.v1.MxCommand\0225\n\021enqueue_timestamp\030\002 \001(" +
|
"d\030\001 \001(\0132\036.mxaccess_gateway.v1.MxCommand\022" +
|
||||||
"\0132\032.google.protobuf.Timestamp\"\201\001\n\022Worker" +
|
"5\n\021enqueue_timestamp\030\002 \001(\0132\032.google.prot" +
|
||||||
"CommandReply\0222\n\005reply\030\001 \001(\0132#.mxaccess_g" +
|
"obuf.Timestamp\"\201\001\n\022WorkerCommandReply\0222\n" +
|
||||||
"ateway.v1.MxCommandReply\0227\n\023completed_ti" +
|
"\005reply\030\001 \001(\0132#.mxaccess_gateway.v1.MxCom" +
|
||||||
"mestamp\030\002 \001(\0132\032.google.protobuf.Timestam" +
|
"mandReply\0227\n\023completed_timestamp\030\002 \001(\0132\032" +
|
||||||
"p\"\036\n\014WorkerCancel\022\016\n\006reason\030\001 \001(\t\"Q\n\016Wor" +
|
".google.protobuf.Timestamp\"\036\n\014WorkerCanc" +
|
||||||
"kerShutdown\022/\n\014grace_period\030\001 \001(\0132\031.goog" +
|
"el\022\016\n\006reason\030\001 \001(\t\"Q\n\016WorkerShutdown\022/\n\014" +
|
||||||
"le.protobuf.Duration\022\016\n\006reason\030\002 \001(\t\"H\n\021" +
|
"grace_period\030\001 \001(\0132\031.google.protobuf.Dur" +
|
||||||
"WorkerShutdownAck\0223\n\006status\030\001 \001(\0132#.mxac" +
|
"ation\022\016\n\006reason\030\002 \001(\t\"H\n\021WorkerShutdownA" +
|
||||||
"cess_gateway.v1.ProtocolStatus\":\n\013Worker" +
|
"ck\0223\n\006status\030\001 \001(\0132#.mxaccess_gateway.v1" +
|
||||||
"Event\022+\n\005event\030\001 \001(\0132\034.mxaccess_gateway." +
|
".ProtocolStatus\":\n\013WorkerEvent\022+\n\005event\030" +
|
||||||
"v1.MxEvent\"\245\002\n\017WorkerHeartbeat\022\031\n\021worker" +
|
"\001 \001(\0132\034.mxaccess_gateway.v1.MxEvent\"\245\002\n\017" +
|
||||||
"_process_id\030\001 \001(\005\022.\n\005state\030\002 \001(\0162\037.mxacc" +
|
"WorkerHeartbeat\022\031\n\021worker_process_id\030\001 \001" +
|
||||||
"ess_worker.v1.WorkerState\022?\n\033last_sta_ac" +
|
"(\005\022.\n\005state\030\002 \001(\0162\037.mxaccess_worker.v1.W" +
|
||||||
"tivity_timestamp\030\003 \001(\0132\032.google.protobuf" +
|
"orkerState\022?\n\033last_sta_activity_timestam" +
|
||||||
".Timestamp\022\035\n\025pending_command_count\030\004 \001(" +
|
"p\030\003 \001(\0132\032.google.protobuf.Timestamp\022\035\n\025p" +
|
||||||
"\r\022\"\n\032outbound_event_queue_depth\030\005 \001(\r\022\033\n" +
|
"ending_command_count\030\004 \001(\r\022\"\n\032outbound_e" +
|
||||||
"\023last_event_sequence\030\006 \001(\004\022&\n\036current_co" +
|
"vent_queue_depth\030\005 \001(\r\022\033\n\023last_event_seq" +
|
||||||
"mmand_correlation_id\030\007 \001(\t\"\364\001\n\013WorkerFau" +
|
"uence\030\006 \001(\004\022&\n\036current_command_correlati" +
|
||||||
"lt\0229\n\010category\030\001 \001(\0162\'.mxaccess_worker.v" +
|
"on_id\030\007 \001(\t\"\364\001\n\013WorkerFault\0229\n\010category\030" +
|
||||||
"1.WorkerFaultCategory\022\026\n\016command_method\030" +
|
"\001 \001(\0162\'.mxaccess_worker.v1.WorkerFaultCa" +
|
||||||
"\002 \001(\t\022\024\n\007hresult\030\003 \001(\005H\000\210\001\001\022\026\n\016exception" +
|
"tegory\022\026\n\016command_method\030\002 \001(\t\022\024\n\007hresul" +
|
||||||
"_type\030\004 \001(\t\022\032\n\022diagnostic_message\030\005 \001(\t\022" +
|
"t\030\003 \001(\005H\000\210\001\001\022\026\n\016exception_type\030\004 \001(\t\022\032\n\022" +
|
||||||
"<\n\017protocol_status\030\006 \001(\0132#.mxaccess_gate" +
|
"diagnostic_message\030\005 \001(\t\022<\n\017protocol_sta" +
|
||||||
"way.v1.ProtocolStatusB\n\n\010_hresult*\227\002\n\013Wo" +
|
"tus\030\006 \001(\0132#.mxaccess_gateway.v1.Protocol" +
|
||||||
"rkerState\022\034\n\030WORKER_STATE_UNSPECIFIED\020\000\022" +
|
"StatusB\n\n\010_hresult*\227\002\n\013WorkerState\022\034\n\030WO" +
|
||||||
"\031\n\025WORKER_STATE_STARTING\020\001\022\034\n\030WORKER_STA" +
|
"RKER_STATE_UNSPECIFIED\020\000\022\031\n\025WORKER_STATE" +
|
||||||
"TE_HANDSHAKING\020\002\022!\n\035WORKER_STATE_INITIAL" +
|
"_STARTING\020\001\022\034\n\030WORKER_STATE_HANDSHAKING\020" +
|
||||||
"IZING_STA\020\003\022\026\n\022WORKER_STATE_READY\020\004\022\"\n\036W" +
|
"\002\022!\n\035WORKER_STATE_INITIALIZING_STA\020\003\022\026\n\022" +
|
||||||
"ORKER_STATE_EXECUTING_COMMAND\020\005\022\036\n\032WORKE" +
|
"WORKER_STATE_READY\020\004\022\"\n\036WORKER_STATE_EXE" +
|
||||||
"R_STATE_SHUTTING_DOWN\020\006\022\030\n\024WORKER_STATE_" +
|
"CUTING_COMMAND\020\005\022\036\n\032WORKER_STATE_SHUTTIN" +
|
||||||
"STOPPED\020\007\022\030\n\024WORKER_STATE_FAULTED\020\010*\307\004\n\023" +
|
"G_DOWN\020\006\022\030\n\024WORKER_STATE_STOPPED\020\007\022\030\n\024WO" +
|
||||||
"WorkerFaultCategory\022%\n!WORKER_FAULT_CATE" +
|
"RKER_STATE_FAULTED\020\010*\307\004\n\023WorkerFaultCate" +
|
||||||
"GORY_UNSPECIFIED\020\000\022+\n\'WORKER_FAULT_CATEG" +
|
"gory\022%\n!WORKER_FAULT_CATEGORY_UNSPECIFIE" +
|
||||||
"ORY_INVALID_ARGUMENTS\020\001\0227\n3WORKER_FAULT_" +
|
"D\020\000\022+\n\'WORKER_FAULT_CATEGORY_INVALID_ARG" +
|
||||||
"CATEGORY_GATEWAY_AUTHENTICATION_FAILED\020\002" +
|
"UMENTS\020\001\0227\n3WORKER_FAULT_CATEGORY_GATEWA" +
|
||||||
"\022+\n\'WORKER_FAULT_CATEGORY_PROTOCOL_MISMA" +
|
"Y_AUTHENTICATION_FAILED\020\002\022+\n\'WORKER_FAUL" +
|
||||||
"TCH\020\003\022,\n(WORKER_FAULT_CATEGORY_PROTOCOL_" +
|
"T_CATEGORY_PROTOCOL_MISMATCH\020\003\022,\n(WORKER" +
|
||||||
"VIOLATION\020\004\022+\n\'WORKER_FAULT_CATEGORY_PIP" +
|
"_FAULT_CATEGORY_PROTOCOL_VIOLATION\020\004\022+\n\'" +
|
||||||
"E_DISCONNECTED\020\005\0222\n.WORKER_FAULT_CATEGOR" +
|
"WORKER_FAULT_CATEGORY_PIPE_DISCONNECTED\020" +
|
||||||
"Y_MXACCESS_CREATION_FAILED\020\006\0221\n-WORKER_F" +
|
"\005\0222\n.WORKER_FAULT_CATEGORY_MXACCESS_CREA" +
|
||||||
"AULT_CATEGORY_MXACCESS_COMMAND_FAILED\020\007\022" +
|
"TION_FAILED\020\006\0221\n-WORKER_FAULT_CATEGORY_M" +
|
||||||
":\n6WORKER_FAULT_CATEGORY_MXACCESS_EVENT_" +
|
"XACCESS_COMMAND_FAILED\020\007\022:\n6WORKER_FAULT" +
|
||||||
"CONVERSION_FAILED\020\010\022\"\n\036WORKER_FAULT_CATE" +
|
"_CATEGORY_MXACCESS_EVENT_CONVERSION_FAIL" +
|
||||||
"GORY_STA_HUNG\020\t\022(\n$WORKER_FAULT_CATEGORY" +
|
"ED\020\010\022\"\n\036WORKER_FAULT_CATEGORY_STA_HUNG\020\t" +
|
||||||
"_QUEUE_OVERFLOW\020\n\022*\n&WORKER_FAULT_CATEGO" +
|
"\022(\n$WORKER_FAULT_CATEGORY_QUEUE_OVERFLOW" +
|
||||||
"RY_SHUTDOWN_TIMEOUT\020\013B&\252\002#ZB.MOM.WW.MxGa" +
|
"\020\n\022*\n&WORKER_FAULT_CATEGORY_SHUTDOWN_TIM" +
|
||||||
"teway.Contracts.Protob\006proto3"
|
"EOUT\020\013B&\252\002#ZB.MOM.WW.MxGateway.Contracts" +
|
||||||
|
".Protob\006proto3"
|
||||||
};
|
};
|
||||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
.internalBuildGeneratedFileFrom(descriptorData,
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
@@ -12629,7 +12742,7 @@ public final class MxaccessWorker extends com.google.protobuf.GeneratedFile {
|
|||||||
internal_static_mxaccess_worker_v1_GatewayHello_fieldAccessorTable = new
|
internal_static_mxaccess_worker_v1_GatewayHello_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_mxaccess_worker_v1_GatewayHello_descriptor,
|
internal_static_mxaccess_worker_v1_GatewayHello_descriptor,
|
||||||
new java.lang.String[] { "SupportedProtocolVersion", "Nonce", "GatewayVersion", });
|
new java.lang.String[] { "SupportedProtocolVersion", "Nonce", "GatewayVersion", "MaxFrameBytes", });
|
||||||
internal_static_mxaccess_worker_v1_WorkerHello_descriptor =
|
internal_static_mxaccess_worker_v1_WorkerHello_descriptor =
|
||||||
getDescriptor().getMessageType(2);
|
getDescriptor().getMessageType(2);
|
||||||
internal_static_mxaccess_worker_v1_WorkerHello_fieldAccessorTable = new
|
internal_static_mxaccess_worker_v1_WorkerHello_fieldAccessorTable = new
|
||||||
|
|||||||
@@ -13,7 +13,19 @@ namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Workers;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class OrphanWorkerTerminatorTests
|
public sealed class OrphanWorkerTerminatorTests
|
||||||
{
|
{
|
||||||
private const string WorkerExecutablePath = @"C:\app\src\ZB.MOM.WW.MxGateway.Worker\bin\x86\Release\ZB.MOM.WW.MxGateway.Worker.exe";
|
// An OS-appropriate, already-normalized absolute path so Path.GetFullPath (used by the
|
||||||
|
// terminator to resolve the configured path) is idempotent and the exact-match compare holds
|
||||||
|
// on every platform. A hard-coded Windows literal (C:\...) is not rooted on Linux, so
|
||||||
|
// Path.GetFullPath there prepends the cwd and the match fails — the terminator is a
|
||||||
|
// Windows-only feature in production, but its matching logic must still be testable on the
|
||||||
|
// Linux CI runner.
|
||||||
|
private static readonly string WorkerExecutablePath = Path.GetFullPath(Path.Combine(
|
||||||
|
Path.GetTempPath(),
|
||||||
|
"MxGatewayOrphanTests",
|
||||||
|
"bin",
|
||||||
|
"x86",
|
||||||
|
"Release",
|
||||||
|
"ZB.MOM.WW.MxGateway.Worker.exe"));
|
||||||
|
|
||||||
/// <summary>Verifies that orphan worker processes matching the configured executable path are killed.</summary>
|
/// <summary>Verifies that orphan worker processes matching the configured executable path are killed.</summary>
|
||||||
[Fact]
|
[Fact]
|
||||||
@@ -59,7 +71,10 @@ public sealed class OrphanWorkerTerminatorTests
|
|||||||
// not our worker and must be left alone.
|
// not our worker and must be left alone.
|
||||||
FakeProcessInspector inspector = new(
|
FakeProcessInspector inspector = new(
|
||||||
[
|
[
|
||||||
new RunningProcessInfo(301, @"C:\other\place\ZB.MOM.WW.MxGateway.Worker.exe"),
|
new RunningProcessInfo(301, Path.GetFullPath(Path.Combine(
|
||||||
|
Path.GetTempPath(),
|
||||||
|
"MxGatewayOrphanTests-other",
|
||||||
|
"ZB.MOM.WW.MxGateway.Worker.exe"))),
|
||||||
]);
|
]);
|
||||||
OrphanWorkerTerminator terminator = CreateTerminator(inspector);
|
OrphanWorkerTerminator terminator = CreateTerminator(inspector);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user