• 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

72.92
/rqueue-core/src/main/java/com/github/sonus21/rqueue/utils/QueueThreadPool.java
1
/*
2
 * Copyright (c) 2021-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.core.RqueueMessage;
20
import com.github.sonus21.rqueue.listener.QueueDetail;
21
import java.util.concurrent.Semaphore;
22
import java.util.concurrent.TimeUnit;
23
import lombok.extern.slf4j.Slf4j;
24
import org.springframework.core.task.AsyncTaskExecutor;
25
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
26

27
@Slf4j
1✔
28
public final class QueueThreadPool {
29
  private final AsyncTaskExecutor taskExecutor;
30
  private final boolean defaultExecutor;
31
  private final Semaphore semaphore;
32
  private final int maxJobsCount;
33

34
  public QueueThreadPool(
35
      AsyncTaskExecutor taskExecutor, boolean defaultExecutor, int maxJobsCount) {
1✔
36
    this.taskExecutor = taskExecutor;
1✔
37
    this.defaultExecutor = defaultExecutor;
1✔
38
    this.maxJobsCount = maxJobsCount;
1✔
39
    this.semaphore = new Semaphore(maxJobsCount);
1✔
40
  }
1✔
41

42
  public void release() {
43
    release(1);
1✔
44
  }
1✔
45

46
  public void release(int n) {
47
    if (n > 0) {
1✔
48
      semaphore.release(n);
1✔
49
    }
50
  }
1✔
51

52
  public boolean acquire(int n, long timeout) throws InterruptedException {
53
    if (log.isDebugEnabled() && taskExecutor instanceof ThreadPoolTaskExecutor) {
1!
UNCOV
54
      ThreadPoolTaskExecutor executor = ((ThreadPoolTaskExecutor) taskExecutor);
×
55
      log.debug("Current active threads {}", executor.getActiveCount());
×
56
    }
57
    return semaphore.tryAcquire(n, timeout, TimeUnit.MILLISECONDS);
1✔
58
  }
59

60
  public void execute(Runnable r) {
61
    this.taskExecutor.execute(r);
1✔
62
  }
1✔
63

64
  public int availableThreads() {
65
    return semaphore.availablePermits();
1✔
66
  }
67

68
  public boolean allTasksCompleted() {
69
    int permits = availableThreads();
1✔
70
    if (permits > maxJobsCount) {
1!
UNCOV
71
      log.error("More number of release is called");
×
72
    }
73
    return permits >= maxJobsCount;
1✔
74
  }
75

76
  public String destroy() {
77
    if (!defaultExecutor) {
1✔
78
      return null;
1✔
79
    }
80
    if (taskExecutor instanceof ThreadPoolTaskExecutor) {
1!
81
      ThreadPoolTaskExecutor executor = ((ThreadPoolTaskExecutor) taskExecutor);
1✔
82
      executor.destroy();
1✔
83
      return executor.getThreadNamePrefix();
1✔
84
    }
UNCOV
85
    return null;
×
86
  }
87

88
  public void taskRejected(QueueDetail queueDetail, RqueueMessage message) {
UNCOV
89
    log.warn(
×
90
        "Task rejected by executor Queue: {}, Message: {}",
UNCOV
91
        queueDetail.getName(),
×
92
        message.getMessage());
×
93
  }
×
94
}
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