• 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

75.76
/rqueue-core/src/main/java/com/github/sonus21/rqueue/utils/TimeoutUtils.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;
18

19
import com.github.sonus21.rqueue.exception.TimedOutException;
20
import java.util.function.BooleanSupplier;
21

22
/**
23
 * waitFor method wait for some event to occur. It accepts a callback as well that can be invoked on
24
 * successive failure of the method. That can be used to diagnosis the test. A callback method is
25
 * used to identify the outcome of some event, if the specified method returns true then call is
26
 * stopped otherwise every 100Ms the callback would be called to get the outcome. It tries for
27
 * continuously over 10seconds If callback does not return true within 10 seconds then it will throw
28
 * TimeOutException. If postmortem method is provided then it will call that method before throwing
29
 * exception.
30
 */
31
public final class TimeoutUtils {
32

33
  public static final long EXECUTION_TIME = 10_000L;
34
  public static final long SLEEP_TIME = 100L;
35

36
  private TimeoutUtils() {}
37

38
  public static void waitFor(
39
      BooleanSupplier callback, long waitTimeInMilliSeconds, String description)
40
      throws TimedOutException {
41
    waitFor(callback, waitTimeInMilliSeconds, SLEEP_TIME, description, () -> {});
1✔
42
  }
1✔
43

44
  public static void waitFor(BooleanSupplier callback, String description)
45
      throws TimedOutException {
46
    waitFor(callback, EXECUTION_TIME, description);
1✔
47
  }
1✔
48

49
  public static void waitFor(BooleanSupplier callback, String description, Runnable postmortem)
50
      throws TimedOutException {
51
    waitFor(callback, EXECUTION_TIME, SLEEP_TIME, description, postmortem);
1✔
52
  }
1✔
53

54
  public static void waitFor(
55
      BooleanSupplier callback,
56
      long waitTimeInMilliSeconds,
57
      String description,
58
      Runnable postmortem)
59
      throws TimedOutException {
60
    waitFor(callback, waitTimeInMilliSeconds, SLEEP_TIME, description, postmortem);
1✔
61
  }
1✔
62

63
  public static void waitFor(
64
      BooleanSupplier callback,
65
      long waitTimeInMilliSeconds,
66
      long sleepDuration,
67
      String description,
68
      Runnable postmortem)
69
      throws TimedOutException {
70
    long endTime = System.currentTimeMillis() + waitTimeInMilliSeconds;
1✔
71
    do {
72
      if (Boolean.TRUE.equals(callback.getAsBoolean())) {
1✔
73
        return;
1✔
74
      }
75
      sleep(sleepDuration);
1✔
76
    } while (System.currentTimeMillis() < endTime);
1!
77
    try {
UNCOV
78
      postmortem.run();
×
UNCOV
79
    } catch (Exception e) {
×
80
      e.printStackTrace();
×
81
    }
×
82
    throw new TimedOutException("Timed out waiting for " + description);
×
83
  }
84

85
  public static void sleep(long time) {
86
    sleepLog(time, true);
1✔
87
  }
1✔
88

89
  public static void sleepLog(long time, boolean log) {
90
    try {
91
      Thread.sleep(time);
1✔
92
    } catch (InterruptedException e) {
1✔
93
      Thread.currentThread().interrupt();
1✔
94
      if (log) {
1!
UNCOV
95
        e.printStackTrace();
×
96
      }
97
    }
1✔
98
  }
1✔
99
}
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