Skip to content

Commit

Permalink
fix: enhance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teletha committed Oct 14, 2024
1 parent 82c10e6 commit af951ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/main/java/bee/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,8 @@ private final Info info(String name) {
}

synchronized (Task.class) {
if (commons == null) {
if (commons == null || !commons.containsKey(name)) {
commons = new TreeMap();

for (Class<Task> task : I.findAs(Task.class)) {
String taskName = computeTaskName(task);
Info info = new Info(taskName, task);
Expand Down Expand Up @@ -769,7 +768,7 @@ public TaskLifestyle(Class<?> model) {
// ======================================
String task = Type.getInternalName(Task.class);
String parent = Type.getInternalName(model);
writer.visit(V16, ACC_PUBLIC | ACC_SUPER, writer.classInternalName, null, parent, null);
writer.visit(V21, ACC_PUBLIC | ACC_SUPER, writer.classInternalName, null, parent, null);

// constructor
EnhancedMethodWriter mw = writer.writeMethod(ACC_PUBLIC, "<init>", "()V", null, null);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/bee/BeeOptionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void parameterizedSequencialShorts() {
}

@Test
@Disabled
@Disabled("From a consistency point of view, this format should not be supported by Bee.")
void parameterizedShortWithoutSpace() {
List<String> washed = BeeOption.parse("task", "-xparam");
assert washed.size() == 1;
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/bee/task/TaskCacheTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
package bee.task;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import bee.Task;
Expand Down Expand Up @@ -187,7 +186,6 @@ public boolean run() {
}

@Test
@Disabled
void require() {
Req task = I.make(Req.class);
assert ReqCaller.count == 0;
Expand Down

0 comments on commit af951ca

Please sign in to comment.