• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sonus21 / rqueue / 25600722838

09 May 2026 12:06PM UTC coverage: 83.396% (-5.3%) from 88.677%
25600722838

push

github

web-flow
Nats v2 web (#295)

* ci: compile main sources in coverage_report job

The coverage_report job was producing an effectively empty
jacocoTestReport.xml (3.4KB vs ~1.1MB locally) because no .class files
existed when coverageReportOnly ran — the job checked out source code
and downloaded .exec artifacts, but never compiled. JaCoCo's report
generator skips packages/classes it cannot resolve, so the merged XML
ended up with only <sessioninfo> entries and no <package> elements.

That made coverallsJacoco silently no-op via the
"source file set empty, skipping" branch in CoverallsReporter, so
"Push coverage to Coveralls" reported success without uploading.

Verified by downloading the coverage-report artifact from a recent run
and comparing its XML structure against a local build's report.

Assisted-By: Claude Code

* nats-web: implement pause / soft-delete admin ops and capability-aware Q-detail

Replace the all-stub `NatsRqueueUtilityService` with real impls for the operations
JetStream can model: `pauseUnpauseQueue` persists the `paused` flag on `QueueConfig`
in the queue-config KV bucket and notifies the local listener container so the poller
stops dispatching; `deleteMessage` is a soft delete via `MessageMetadataService`
(stream message persists, dashboard hides via the metadata flag); `getDataType`
reports `STREAM`. `moveMessage`, `enqueueMessage`, and `makeEmpty` deliberately
remain "not supported" — there is no JetStream primitive for those.

Update `RqueueQDetailServiceImpl.getRunningTasks` / `getScheduledTasks` to return
header-only tables when the broker capabilities suppress those sections, instead of
emitting zero rows or 501s on NATS.

20 new unit tests cover the pause/delete paths and lock in the still-unsupported
operations. Updates `nats-task.md` / `nats-task-v2.md` to reflect what landed.

Assisted-By: Claude Code

* nats-web: capability-aware nav / charts and stream-based peek

End-to-end browser-tested the NATS dashboard and shipped the t... (continued)

2566 of 3407 branches covered (75.32%)

Branch coverage included in aggregate %.

795 of 1072 new or added lines in 22 files covered. (74.16%)

312 existing lines in 38 files now uncovered.

7715 of 8921 relevant lines covered (86.48%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/rqueue-core/src/main/java/com/github/sonus21/rqueue/utils/backoff/FixedTaskExecutionBackOff.java
1
/*
2
 * Copyright (c) 2020-2026 Sonu Kumar
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * You may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and limitations under the License.
14
 *
15
 */
16

17
package com.github.sonus21.rqueue.utils.backoff;
18

19
import com.github.sonus21.rqueue.core.RqueueMessage;
20

21
/**
22
 * Implementation of the {@link TaskExecutionBackOff} class, that always return the same value,
23
 * except if number of failures have increased too high.
24
 *
25
 * <p>Default delay for the task is 5 seconds, and maximum number of retries is {@value
26
 * Integer#MAX_VALUE}.
27
 *
28
 * <p>There's another implementation of this, that provides exponential delay.
29
 *
30
 * @see ExponentialTaskExecutionBackOff
31
 */
32
public class FixedTaskExecutionBackOff implements TaskExecutionBackOff {
33

34
  /**
35
   * The default task delay: 5000 ms = 5 seconds.
36
   */
37
  public static final long DEFAULT_INTERVAL = 5000;
38

39
  private long interval = DEFAULT_INTERVAL;
1✔
40
  private int maxRetries = Integer.MAX_VALUE;
1✔
41

42
  /**
43
   * Create an instance with an interval of {@value #DEFAULT_INTERVAL} ms and maximum value of
44
   * retries.
45
   */
46
  public FixedTaskExecutionBackOff() {}
1✔
47

48
  /**
49
   * Create an instance.
50
   *
51
   * @param interval   the delay between two attempts.
52
   * @param maxRetries the maximum number of retries.
53
   */
54
  public FixedTaskExecutionBackOff(long interval, int maxRetries) {
1✔
55
    checkInterval(interval);
1✔
56
    checkMaxRetries(maxRetries);
1✔
57
    this.interval = interval;
1✔
58
    this.maxRetries = maxRetries;
1✔
59
  }
1✔
60

61
  /**
62
   * Return the delay between two attempts in milliseconds.
63
   *
64
   * @return the configured interval in milliseconds.
65
   */
66
  public long getInterval() {
67
    return this.interval;
1✔
68
  }
69

70
  /**
71
   * Set the delay between two attempts in milliseconds.
72
   *
73
   * @param interval delay between two attempts.
74
   */
75
  public void setInterval(long interval) {
76
    checkInterval(interval);
1✔
77
    this.interval = interval;
1✔
78
  }
1✔
79

80
  /**
81
   * Return the maximum number of retries.
82
   *
83
   * @return max retires
84
   */
85
  public int getMaxRetries() {
86
    return this.maxRetries;
1✔
87
  }
88

89
  /**
90
   * Set the maximum number of retries
91
   *
92
   * @param maxRetries max number of retires
93
   */
94
  public void setMaxRetries(int maxRetries) {
95
    checkMaxRetries(maxRetries);
1✔
96
    this.maxRetries = maxRetries;
1✔
97
  }
1✔
98

99
  @Override
100
  public long nextBackOff(Object message, RqueueMessage rqueueMessage, int failureCount) {
101
    if (failureCount >= getMaxRetries(message, rqueueMessage, failureCount)) {
1✔
102
      return STOP;
1✔
103
    }
104
    return getInterval(message, rqueueMessage, failureCount);
1✔
105
  }
106

107
  protected int getMaxRetries(Object message, RqueueMessage rqueueMessage, int failureCount) {
108
    return getMaxRetries();
1✔
109
  }
110

111
  protected long getInterval(Object message, RqueueMessage rqueueMessage, int failureCount) {
112
    return getInterval();
1✔
113
  }
114

115
  private void checkInterval(long interval) {
116
    if (interval <= 0) {
1✔
117
      throw new IllegalArgumentException("interval must be > 0");
1✔
118
    }
119
  }
1✔
120

121
  private void checkMaxRetries(int maxRetries) {
122
    if (maxRetries < 0) {
1✔
123
      throw new IllegalArgumentException("maxRetries must be > 0");
1✔
124
    }
125
  }
1✔
126

127
  @Override
128
  public boolean equals(Object other) {
129
    if (other instanceof FixedTaskExecutionBackOff) {
1!
130
      return ((FixedTaskExecutionBackOff) other).getInterval() == getInterval()
1!
131
          && ((FixedTaskExecutionBackOff) other).getMaxRetries() == getMaxRetries();
1!
132
    }
UNCOV
133
    return false;
×
134
  }
135
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc