• 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

67.39
/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/RqueueRedisSerializer.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.converter;
18

19
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
20
import com.github.sonus21.rqueue.serdes.SerializationUtils;
21
import lombok.extern.slf4j.Slf4j;
22
import org.springframework.cache.support.NullValue;
23
import org.springframework.data.redis.serializer.RedisSerializer;
24
import org.springframework.data.redis.serializer.SerializationException;
25
import tools.jackson.core.JacksonException;
26
import tools.jackson.core.JsonGenerator;
27
import tools.jackson.databind.DefaultTyping;
28
import tools.jackson.databind.ObjectMapper;
29
import tools.jackson.databind.SerializationContext;
30
import tools.jackson.databind.jsontype.BasicPolymorphicTypeValidator;
31
import tools.jackson.databind.module.SimpleModule;
32
import tools.jackson.databind.ser.std.StdSerializer;
33

34
@Slf4j
1✔
35
public class RqueueRedisSerializer implements RedisSerializer<Object> {
36

37
  private final RedisSerializer<Object> serializer;
38

39
  public RqueueRedisSerializer(RedisSerializer<Object> redisSerializer) {
1✔
40
    this.serializer = redisSerializer;
1✔
41
  }
1✔
42

43
  public RqueueRedisSerializer() {
44
    this(new RqueueRedisSerDes());
1✔
45
  }
1✔
46

47
  @Override
48
  public byte[] serialize(Object t) throws SerializationException {
49
    return serializer.serialize(t);
1✔
50
  }
51

52
  @Override
53
  public Object deserialize(byte[] bytes) throws SerializationException {
54
    if (SerializationUtils.isEmpty(bytes)) {
1✔
55
      return null;
1✔
56
    }
57
    try {
58
      return serializer.deserialize(bytes);
1✔
59
    } catch (Exception e) {
×
60
      log.warn("Deserialization has failed {}", new String(bytes), e);
×
61
      return new String(bytes);
×
62
    }
63
  }
64

65
  // adapted from spring-data-redis
66
  private static class RqueueRedisSerDes implements RedisSerializer<Object> {
67
    private final ObjectMapper mapper;
68

69
    RqueueRedisSerDes() {
1✔
70
      this.mapper = SerializationUtils.getObjectMapper()
1✔
71
          .rebuild()
1✔
72
          .addModule(new SimpleModule().addSerializer(new NullValueSerializer()))
1✔
73
          .activateDefaultTyping(
1✔
74
              BasicPolymorphicTypeValidator.builder()
1✔
75
                  .allowIfSubType(Object.class)
1✔
76
                  .build(),
1✔
77
              DefaultTyping.NON_FINAL,
78
              As.PROPERTY)
79
          .build();
1✔
80
    }
1✔
81

82
    @Override
83
    public byte[] serialize(Object source) throws SerializationException {
84
      if (source == null) {
1!
UNCOV
85
        return SerializationUtils.EMPTY_ARRAY;
×
86
      }
87
      try {
88
        return mapper.writeValueAsBytes(source);
1✔
UNCOV
89
      } catch (JacksonException e) {
×
UNCOV
90
        throw new SerializationException("Could not write JSON: " + e.getMessage(), e);
×
91
      }
92
    }
93

94
    @Override
95
    public Object deserialize(byte[] source) throws SerializationException {
96
      if (SerializationUtils.isEmpty(source)) {
1!
UNCOV
97
        return null;
×
98
      }
99
      try {
100
        return mapper.readValue(source, Object.class);
1✔
UNCOV
101
      } catch (Exception ex) {
×
UNCOV
102
        throw new SerializationException("Could not read JSON: " + ex.getMessage(), ex);
×
103
      }
104
    }
105

106
    private static class NullValueSerializer extends StdSerializer<NullValue> {
107

108
      private static final long serialVersionUID = 211020517180777825L;
109
      private final String classIdentifier;
110

111
      NullValueSerializer() {
112
        super(NullValue.class);
1✔
113
        this.classIdentifier = "@class";
1✔
114
      }
1✔
115

116
      @Override
117
      public void serialize(
118
          NullValue value, JsonGenerator jsonGenerator, SerializationContext provider)
119
          throws JacksonException {
UNCOV
120
        jsonGenerator.writeStartObject();
×
UNCOV
121
        jsonGenerator.writeStringProperty(classIdentifier, NullValue.class.getName());
×
UNCOV
122
        jsonGenerator.writeEndObject();
×
UNCOV
123
      }
×
124
    }
125
  }
126
}
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