You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/05 09:12:52 UTC
[PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
aglinxinyuan opened a new pull request, #6159:
URL: https://github.com/apache/texera/pull/6159
### What changes were proposed in this PR?
Adds `NetworkOutputGatewaySpec` (new) for the amber messaging layer's `NetworkOutputGateway`, which had no spec. Using a hand-rolled capture handler (no actor system), it covers the previously-untested paths:
- `sendTo(ChannelIdentity, payload)` rewriting a `SELF` receiver to the actor id, and passing a non-`SELF` channel through verbatim;
- `sendTo(SELF, DataPayload)` folding `SELF` to the actor id;
- per-channel sequence-number increment and `getFIFOState`.
No production code changed.
### Any related issues, documentation, discussions?
Coverage gaps identified from the Codecov report for `apache/texera` (amber module coverage push toward 80%).
### How was this PR tested?
```
sbt "WorkflowExecutionService/testOnly *NetworkOutputGatewaySpec"
```
All 5 pass. `scalafmt` and `scalafixAll --check` are clean.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6159:
URL: https://github.com/apache/texera/pull/6159#discussion_r3531511941
##########
amber/src/test/scala/org/apache/texera/amber/engine/architecture/messaginglayer/NetworkOutputGatewaySpec.scala:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.engine.architecture.messaginglayer
+
+import org.apache.texera.amber.core.tuple.Tuple
+import org.apache.texera.amber.core.virtualidentity.{ActorVirtualIdentity, ChannelIdentity}
+import org.apache.texera.amber.engine.common.ambermessage.{DataFrame, WorkflowFIFOMessage}
+import org.apache.texera.amber.engine.common.virtualidentity.util.SELF
+import org.scalatest.flatspec.AnyFlatSpec
+
+class NetworkOutputGatewaySpec extends AnyFlatSpec {
+
+ private val actorId = ActorVirtualIdentity("self")
+ private val other = ActorVirtualIdentity("other")
+
+ private def newFixture()
+ : (NetworkOutputGateway, scala.collection.mutable.ArrayBuffer[WorkflowFIFOMessage]) = {
+ val buf = scala.collection.mutable.ArrayBuffer[WorkflowFIFOMessage]()
+ val g = new NetworkOutputGateway(actorId, msg => { buf += msg; () })
+ (g, buf)
+ }
+
+ "network output gateway" should "rewrite a SELF-targeted channel's toWorkerId to actorId and increment sequence numbers" in {
+ val (g, buf) = newFixture()
+ val channelId = ChannelIdentity(other, SELF, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+ g.sendTo(channelId, payload)
+
+ assert(buf.size == 2)
+ // toWorkerId == SELF is folded to actorId, other fields preserved
+ val expectedChannel = ChannelIdentity(other, actorId, isControl = false)
+ assert(buf(0).channelId == expectedChannel)
+ assert(buf(1).channelId == expectedChannel)
+ // sequence number starts at 0 and increments to 1 on the second send
+ assert(buf(0).sequenceNumber == 0L)
+ assert(buf(1).sequenceNumber == 1L)
+ }
+
+ "network output gateway" should "pass a non-SELF channel through verbatim" in {
+ val (g, buf) = newFixture()
+ val channelId = ChannelIdentity(actorId, other, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == channelId)
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "fold a SELF receiver to actorId on the data channel via the ActorVirtualIdentity overload" in {
+ val (g, buf) = newFixture()
+
+ g.sendTo(SELF, DataFrame(Array.empty[Tuple]))
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == ChannelIdentity(actorId, actorId, isControl = false))
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "keep a non-SELF receiver as-is on the data channel via the ActorVirtualIdentity overload" in {
+ val (g, buf) = newFixture()
+
+ g.sendTo(other, DataFrame(Array.empty[Tuple]))
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == ChannelIdentity(actorId, other, isControl = false))
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "reflect per-channel sequence numbers in getFIFOState" in {
+ val (g, _) = newFixture()
+ val channelId = ChannelIdentity(actorId, other, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+ g.sendTo(channelId, payload)
+
+ assert(g.getFIFOState(channelId) == 2L)
Review Comment:
Good catch — fixed in eb00a6062f. Switched the assertion to `g.getFIFOState.get(channelId).contains(2L)` so a missing key yields an explicit `false` (assertion failure) rather than a `NoSuchElementException` from `Map.apply`.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #6159:
URL: https://github.com/apache/texera/pull/6159
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6159:
URL: https://github.com/apache/texera/pull/6159#issuecomment-4885518753
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6159?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 59.84%. Comparing base ([`5acb734`](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`71a5d1e`](https://app.codecov.io/gh/apache/texera/commit/71a5d1eeb9b70dbe9c0d3e9e4640c6fce603dfba?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on main.
:white_check_mark: All tests successful. No failed tests found.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #6159 +/- ##
============================================
- Coverage 59.85% 59.84% -0.01%
+ Complexity 3302 3300 -2
============================================
Files 1131 1131
Lines 43770 43770
Branches 4745 4745
============================================
- Hits 26197 26195 -2
- Misses 16147 16149 +2
Partials 1426 1426
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `44.59% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `64.90% <ø> (-0.02%)` | :arrow_down: | |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.81% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.48% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.57% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.18% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6159/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [5acb734](https://app.codecov.io/gh/apache/texera/commit/5acb73433a17ebfaba73d5da19b00b4fc2d3823f?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6159?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6159:
URL: https://github.com/apache/texera/pull/6159#issuecomment-4885516601
<!-- texera-benchmarks-comment -->
## ⚠️ Benchmark changes need a look
🟢 2 better · 🔴 1 worse · ⚪ 12 noise (<±5%) · 0 without baseline
> Compared against main `5acb734` benchmarked on **this same runner**, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.
[Dashboard](https://apache.github.io/texera/dev/bench/) · [Run](https://github.com/apache/texera/actions/runs/28735873181)
| | config | throughput | MB/s | latency | max Δ latest / 7d |
|---|---|---:|---:|---:|---:|
| 🔴 | bs=10 sw=10 sl=64 | 388 | 0.237 | 25,344/30,936/30,936 us | 🟢 -14.9% / 🔴 +104.3% |
| ⚪ | bs=100 sw=10 sl=64 | 802 | 0.49 | 125,587/135,273/135,273 us | ⚪ within ±5% / 🔴 +25.3% |
| ⚪ | bs=1000 sw=10 sl=64 | 914 | 0.558 | 1,097,684/1,127,946/1,127,946 us | ⚪ within ±5% / 🔴 +10.9% |
<details><summary>Baseline details</summary>
Latest main `5acb734` from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---:|---:|---:|---:|---:|
| bs=10 sw=10 sl=64 | throughput | 388 tuples/sec | 394 tuples/sec | 776.36 tuples/sec | -1.5% | -50.0% |
| bs=10 sw=10 sl=64 | MB/s | 0.237 MB/s | 0.241 MB/s | 0.474 MB/s | -1.7% | -50.0% |
| bs=10 sw=10 sl=64 | p50 | 25,344 us | 22,892 us | 12,636 us | +10.7% | +100.6% |
| bs=10 sw=10 sl=64 | p95 | 30,936 us | 36,338 us | 15,143 us | -14.9% | +104.3% |
| bs=10 sw=10 sl=64 | p99 | 30,936 us | 36,338 us | 18,954 us | -14.9% | +63.2% |
| bs=100 sw=10 sl=64 | throughput | 802 tuples/sec | 791 tuples/sec | 985.33 tuples/sec | +1.4% | -18.6% |
| bs=100 sw=10 sl=64 | MB/s | 0.49 MB/s | 0.483 MB/s | 0.601 MB/s | +1.4% | -18.5% |
| bs=100 sw=10 sl=64 | p50 | 125,587 us | 125,876 us | 101,671 us | -0.2% | +23.5% |
| bs=100 sw=10 sl=64 | p95 | 135,273 us | 139,632 us | 107,939 us | -3.1% | +25.3% |
| bs=100 sw=10 sl=64 | p99 | 135,273 us | 139,632 us | 113,798 us | -3.1% | +18.9% |
| bs=1000 sw=10 sl=64 | throughput | 914 tuples/sec | 910 tuples/sec | 1,016 tuples/sec | +0.4% | -10.1% |
| bs=1000 sw=10 sl=64 | MB/s | 0.558 MB/s | 0.555 MB/s | 0.62 MB/s | +0.5% | -10.1% |
| bs=1000 sw=10 sl=64 | p50 | 1,097,684 us | 1,100,487 us | 989,693 us | -0.3% | +10.9% |
| bs=1000 sw=10 sl=64 | p95 | 1,127,946 us | 1,150,285 us | 1,028,327 us | -1.9% | +9.7% |
| bs=1000 sw=10 sl=64 | p99 | 1,127,946 us | 1,150,285 us | 1,059,969 us | -1.9% | +6.4% |
</details>
<details><summary>Raw CSV</summary>
```csv
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,515.87,200,128000,388,0.237,25344.00,30936.41,30936.41
1,100,10,64,20,2492.54,2000,1280000,802,0.490,125587.48,135272.64,135272.64
2,1000,10,64,20,21886.68,20000,12800000,914,0.558,1097684.23,1127945.60,1127945.60
```
</details>
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6159:
URL: https://github.com/apache/texera/pull/6159#discussion_r3524610190
##########
amber/src/test/scala/org/apache/texera/amber/engine/architecture/messaginglayer/NetworkOutputGatewaySpec.scala:
##########
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.texera.amber.engine.architecture.messaginglayer
+
+import org.apache.texera.amber.core.tuple.Tuple
+import org.apache.texera.amber.core.virtualidentity.{ActorVirtualIdentity, ChannelIdentity}
+import org.apache.texera.amber.engine.common.ambermessage.{DataFrame, WorkflowFIFOMessage}
+import org.apache.texera.amber.engine.common.virtualidentity.util.SELF
+import org.scalatest.flatspec.AnyFlatSpec
+
+class NetworkOutputGatewaySpec extends AnyFlatSpec {
+
+ private val actorId = ActorVirtualIdentity("self")
+ private val other = ActorVirtualIdentity("other")
+
+ private def newFixture()
+ : (NetworkOutputGateway, scala.collection.mutable.ArrayBuffer[WorkflowFIFOMessage]) = {
+ val buf = scala.collection.mutable.ArrayBuffer[WorkflowFIFOMessage]()
+ val g = new NetworkOutputGateway(actorId, msg => { buf += msg; () })
+ (g, buf)
+ }
+
+ "network output gateway" should "rewrite a SELF-targeted channel's toWorkerId to actorId and increment sequence numbers" in {
+ val (g, buf) = newFixture()
+ val channelId = ChannelIdentity(other, SELF, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+ g.sendTo(channelId, payload)
+
+ assert(buf.size == 2)
+ // toWorkerId == SELF is folded to actorId, other fields preserved
+ val expectedChannel = ChannelIdentity(other, actorId, isControl = false)
+ assert(buf(0).channelId == expectedChannel)
+ assert(buf(1).channelId == expectedChannel)
+ // sequence number starts at 0 and increments to 1 on the second send
+ assert(buf(0).sequenceNumber == 0L)
+ assert(buf(1).sequenceNumber == 1L)
+ }
+
+ "network output gateway" should "pass a non-SELF channel through verbatim" in {
+ val (g, buf) = newFixture()
+ val channelId = ChannelIdentity(actorId, other, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == channelId)
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "fold a SELF receiver to actorId on the data channel via the ActorVirtualIdentity overload" in {
+ val (g, buf) = newFixture()
+
+ g.sendTo(SELF, DataFrame(Array.empty[Tuple]))
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == ChannelIdentity(actorId, actorId, isControl = false))
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "keep a non-SELF receiver as-is on the data channel via the ActorVirtualIdentity overload" in {
+ val (g, buf) = newFixture()
+
+ g.sendTo(other, DataFrame(Array.empty[Tuple]))
+
+ assert(buf.size == 1)
+ assert(buf(0).channelId == ChannelIdentity(actorId, other, isControl = false))
+ assert(buf(0).sequenceNumber == 0L)
+ }
+
+ "network output gateway" should "reflect per-channel sequence numbers in getFIFOState" in {
+ val (g, _) = newFixture()
+ val channelId = ChannelIdentity(actorId, other, isControl = false)
+ val payload = DataFrame(Array.empty[Tuple])
+
+ g.sendTo(channelId, payload)
+ g.sendTo(channelId, payload)
+
+ assert(g.getFIFOState(channelId) == 2L)
Review Comment:
`getFIFOState` returns a `Map[ChannelIdentity, Long]`, and using `g.getFIFOState(channelId)` relies on `Map.apply`, which will throw `NoSuchElementException` if the key is missing (making failures less informative). Using `.get(...).contains(...)` keeps the assertion explicit and avoids an exception-driven failure mode.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(amber): add NetworkOutputGateway SELF-rewrite and FIFO-state tests [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6159:
URL: https://github.com/apache/texera/pull/6159#issuecomment-4885502943
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- No candidates found from `git blame` history.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org