public class io.vertx.ext.unit.impl.TestCommand extends io.vertx.core.impl.launcher.commands.RunCommand
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.ext.unit.impl.TestCommand
super_class: io.vertx.core.impl.launcher.commands.RunCommand
{
private final java.util.concurrent.CompletableFuture<java.lang.String> deployedFuture;
descriptor: Ljava/util/concurrent/CompletableFuture;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/CompletableFuture<Ljava/lang/String;>;
private java.lang.String test;
descriptor: Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
private boolean report;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private long timeout;
descriptor: J
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial io.vertx.core.impl.launcher.commands.RunCommand.<init>:()V
1: aload 0
new java.util.concurrent.CompletableFuture
dup
invokespecial java.util.concurrent.CompletableFuture.<init>:()V
putfield io.vertx.ext.unit.impl.TestCommand.deployedFuture:Ljava/util/concurrent/CompletableFuture;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/ext/unit/impl/TestCommand;
public void setTest(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield io.vertx.ext.unit.impl.TestCommand.test:Ljava/lang/String;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 2 1 test Ljava/lang/String;
RuntimeVisibleAnnotations:
io.vertx.core.cli.annotations.Option(longName = "test", argName = "test")
io.vertx.core.cli.annotations.Description(value = "Select one or several tests to run")
MethodParameters:
Name Flags
test
public void setReport(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield io.vertx.ext.unit.impl.TestCommand.report:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 2 1 report Z
RuntimeVisibleAnnotations:
io.vertx.core.cli.annotations.Option(longName = "report", argName = "report")
io.vertx.core.cli.annotations.Description(value = "Report the execution to a file in JUnit XML format")
MethodParameters:
Name Flags
report
public void setTimeout(long);
descriptor: (J)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
lload 1
putfield io.vertx.ext.unit.impl.TestCommand.timeout:J
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 2 1 timeout J
RuntimeVisibleAnnotations:
io.vertx.core.cli.annotations.Option(longName = "timeout", argName = "timeout")
io.vertx.core.cli.annotations.Description(value = "Set the test suite timeout in millis")
MethodParameters:
Name Flags
timeout
protected void deploy();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=1
start local 0 0: new java.util.concurrent.ConcurrentLinkedDeque
dup
invokespecial java.util.concurrent.ConcurrentLinkedDeque.<init>:()V
astore 1
start local 1 1: aload 0
aload 1
invokedynamic handle(Lio/vertx/ext/unit/impl/TestCommand;Ljava/util/concurrent/ConcurrentLinkedDeque;)Lio/vertx/core/Handler;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
io/vertx/ext/unit/impl/TestCommand.lambda$0(Ljava/util/concurrent/ConcurrentLinkedDeque;Lio/vertx/ext/unit/impl/TestSuiteRunner;)V (7)
(Lio/vertx/ext/unit/impl/TestSuiteRunner;)V
invokestatic io.vertx.ext.unit.impl.TestSuiteImpl.setDefaultRunner:(Lio/vertx/core/Handler;)V
2: aload 0
invokespecial io.vertx.core.impl.launcher.commands.RunCommand.deploy:()V
3: aload 0
getfield io.vertx.ext.unit.impl.TestCommand.deployedFuture:Ljava/util/concurrent/CompletableFuture;
invokevirtual java.util.concurrent.CompletableFuture.get:()Ljava/lang/Object;
pop
4: goto 13
StackMap locals: io.vertx.ext.unit.impl.TestCommand java.util.concurrent.ConcurrentLinkedDeque
StackMap stack: java.lang.InterruptedException
5: pop
6: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.Thread.interrupt:()V
7: iconst_1
invokestatic java.lang.System.exit:(I)V
8: return
9: StackMap locals:
StackMap stack: java.util.concurrent.ExecutionException
astore 2
start local 2 10: aload 2
invokevirtual java.util.concurrent.ExecutionException.getCause:()Ljava/lang/Throwable;
invokevirtual java.lang.Throwable.printStackTrace:()V
11: iconst_1
invokestatic java.lang.System.exit:(I)V
12: return
end local 2 13: StackMap locals:
StackMap stack:
aload 1
invokevirtual java.util.concurrent.ConcurrentLinkedDeque.size:()I
istore 3
start local 3 14: goto 18
start local 2 15: StackMap locals: io.vertx.ext.unit.impl.TestCompletionImpl int
StackMap stack:
aload 2
invokevirtual io.vertx.ext.unit.impl.TestCompletionImpl.await:()V
16: aload 2
invokevirtual io.vertx.ext.unit.impl.TestCompletionImpl.isSucceeded:()Z
ifeq 18
17: iinc 3 -1
end local 2 18: StackMap locals: io.vertx.ext.unit.impl.TestCommand java.util.concurrent.ConcurrentLinkedDeque top int
StackMap stack:
aload 1
invokevirtual java.util.concurrent.ConcurrentLinkedDeque.poll:()Ljava/lang/Object;
checkcast io.vertx.ext.unit.impl.TestCompletionImpl
dup
astore 2
start local 2 19: ifnonnull 15
20: iload 3
invokestatic java.lang.System.exit:(I)V
21: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lio/vertx/ext/unit/impl/TestCommand;
1 22 1 completions Ljava/util/concurrent/ConcurrentLinkedDeque<Lio/vertx/ext/unit/impl/TestCompletionImpl;>;
10 13 2 e Ljava/util/concurrent/ExecutionException;
15 18 2 completion Lio/vertx/ext/unit/impl/TestCompletionImpl;
19 22 2 completion Lio/vertx/ext/unit/impl/TestCompletionImpl;
14 22 3 remainingCompletions I
Exception table:
from to target type
3 4 5 Class java.lang.InterruptedException
3 4 9 Class java.util.concurrent.ExecutionException
public synchronized void deploy(java.lang.String, io.vertx.core.Vertx, io.vertx.core.DeploymentOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.String>>);
descriptor: (Ljava/lang/String;Lio/vertx/core/Vertx;Lio/vertx/core/DeploymentOptions;Lio/vertx/core/Handler;)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=6, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
aload 2
aload 3
aload 0
aload 4
invokedynamic handle(Lio/vertx/ext/unit/impl/TestCommand;Lio/vertx/core/Handler;)Lio/vertx/core/Handler;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
io/vertx/ext/unit/impl/TestCommand.lambda$1(Lio/vertx/core/Handler;Lio/vertx/core/AsyncResult;)V (7)
(Lio/vertx/core/AsyncResult;)V
invokespecial io.vertx.core.impl.launcher.commands.RunCommand.deploy:(Ljava/lang/String;Lio/vertx/core/Vertx;Lio/vertx/core/DeploymentOptions;Lio/vertx/core/Handler;)V
1: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 2 1 verticle Ljava/lang/String;
0 2 2 vertx Lio/vertx/core/Vertx;
0 2 3 options Lio/vertx/core/DeploymentOptions;
0 2 4 completionHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/lang/String;>;>;
Signature: (Ljava/lang/String;Lio/vertx/core/Vertx;Lio/vertx/core/DeploymentOptions;Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/lang/String;>;>;)V
MethodParameters:
Name Flags
verticle
vertx
options
completionHandler
private void lambda$0(java.util.concurrent.ConcurrentLinkedDeque, io.vertx.ext.unit.impl.TestSuiteRunner);
descriptor: (Ljava/util/concurrent/ConcurrentLinkedDeque;Lio/vertx/ext/unit/impl/TestSuiteRunner;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=5, locals=8, args_size=3
start local 0 start local 2 0: aload 0
getfield io.vertx.ext.unit.impl.TestCommand.test:Ljava/lang/String;
ifnull 18
1: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 3
start local 3 2: iconst_0
istore 4
start local 4 3: StackMap locals: java.lang.StringBuilder int
StackMap stack:
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.test:Ljava/lang/String;
bipush 42
iload 4
invokevirtual java.lang.String.indexOf:(II)I
istore 5
start local 5 4: iload 5
iconst_m1
if_icmpne 6
5: goto 10
6: StackMap locals: int
StackMap stack:
aload 3
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.test:Ljava/lang/String;
iload 4
iload 5
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokestatic java.util.regex.Pattern.quote:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
7: aload 3
ldc ".*"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
8: iload 5
iconst_1
iadd
istore 4
end local 5 9: goto 3
10: StackMap locals:
StackMap stack:
aload 3
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.test:Ljava/lang/String;
iload 4
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
invokestatic java.util.regex.Pattern.quote:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
11: aload 3
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
astore 5
start local 5 12: aload 2
invokevirtual io.vertx.ext.unit.impl.TestSuiteRunner.getTests:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
start local 6 13: goto 17
14: StackMap locals: java.util.regex.Pattern java.util.Iterator
StackMap stack:
aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.vertx.ext.unit.impl.TestCaseImpl
astore 7
start local 7 15: aload 5
aload 7
getfield io.vertx.ext.unit.impl.TestCaseImpl.name:Ljava/lang/String;
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifne 17
16: aload 6
invokeinterface java.util.Iterator.remove:()V
end local 7 17: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 14
end local 6 end local 5 end local 4 end local 3 18: StackMap locals: io.vertx.ext.unit.impl.TestCommand java.util.concurrent.ConcurrentLinkedDeque io.vertx.ext.unit.impl.TestSuiteRunner
StackMap stack:
aload 2
invokevirtual io.vertx.ext.unit.impl.TestSuiteRunner.getReporter:()Lio/vertx/core/Handler;
checkcast io.vertx.ext.unit.impl.TestCompletionImpl
astore 3
start local 3 19: new io.vertx.ext.unit.report.impl.DefaultReporterFactory
dup
invokespecial io.vertx.ext.unit.report.impl.DefaultReporterFactory.<init>:()V
astore 4
start local 4 20: aload 3
aload 4
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.vertx:Lio/vertx/core/Vertx;
new io.vertx.ext.unit.report.ReportOptions
dup
invokespecial io.vertx.ext.unit.report.ReportOptions.<init>:()V
ldc "console"
invokevirtual io.vertx.ext.unit.report.ReportOptions.setTo:(Ljava/lang/String;)Lio/vertx/ext/unit/report/ReportOptions;
invokeinterface io.vertx.ext.unit.report.ReporterFactory.reporter:(Lio/vertx/core/Vertx;Lio/vertx/ext/unit/report/ReportOptions;)Lio/vertx/ext/unit/report/Reporter;
invokevirtual io.vertx.ext.unit.impl.TestCompletionImpl.addReporter:(Lio/vertx/ext/unit/report/Reporter;)V
21: aload 0
getfield io.vertx.ext.unit.impl.TestCommand.report:Z
ifeq 23
22: aload 3
aload 4
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.vertx:Lio/vertx/core/Vertx;
new io.vertx.ext.unit.report.ReportOptions
dup
invokespecial io.vertx.ext.unit.report.ReportOptions.<init>:()V
ldc "file:."
invokevirtual io.vertx.ext.unit.report.ReportOptions.setTo:(Ljava/lang/String;)Lio/vertx/ext/unit/report/ReportOptions;
ldc "junit"
invokevirtual io.vertx.ext.unit.report.ReportOptions.setFormat:(Ljava/lang/String;)Lio/vertx/ext/unit/report/ReportOptions;
invokeinterface io.vertx.ext.unit.report.ReporterFactory.reporter:(Lio/vertx/core/Vertx;Lio/vertx/ext/unit/report/ReportOptions;)Lio/vertx/ext/unit/report/Reporter;
invokevirtual io.vertx.ext.unit.impl.TestCompletionImpl.addReporter:(Lio/vertx/ext/unit/report/Reporter;)V
23: StackMap locals: io.vertx.ext.unit.impl.TestCompletionImpl io.vertx.ext.unit.report.ReporterFactory
StackMap stack:
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.timeout:J
lconst_0
lcmp
ifle 25
24: aload 2
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.timeout:J
invokevirtual io.vertx.ext.unit.impl.TestSuiteRunner.setTimeout:(J)Lio/vertx/ext/unit/impl/TestSuiteRunner;
pop
25: StackMap locals:
StackMap stack:
aload 1
aload 3
invokevirtual java.util.concurrent.ConcurrentLinkedDeque.add:(Ljava/lang/Object;)Z
pop
26: aload 2
invokevirtual io.vertx.ext.unit.impl.TestSuiteRunner.run:()V
end local 4 end local 3 27: return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 28 2 runner Lio/vertx/ext/unit/impl/TestSuiteRunner;
2 18 3 sb Ljava/lang/StringBuilder;
3 18 4 prev I
4 9 5 pos I
12 18 5 p Ljava/util/regex/Pattern;
13 18 6 i Ljava/util/Iterator<Lio/vertx/ext/unit/impl/TestCaseImpl;>;
15 17 7 test Lio/vertx/ext/unit/impl/TestCaseImpl;
19 27 3 reporter Lio/vertx/ext/unit/impl/TestCompletionImpl;
20 27 4 f Lio/vertx/ext/unit/report/ReporterFactory;
private void lambda$1(io.vertx.core.Handler, io.vertx.core.AsyncResult);
descriptor: (Lio/vertx/core/Handler;Lio/vertx/core/AsyncResult;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 2 0: aload 2
invokeinterface io.vertx.core.AsyncResult.succeeded:()Z
ifeq 3
1: aload 0
getfield io.vertx.ext.unit.impl.TestCommand.deployedFuture:Ljava/util/concurrent/CompletableFuture;
aload 2
invokeinterface io.vertx.core.AsyncResult.result:()Ljava/lang/Object;
checkcast java.lang.String
invokevirtual java.util.concurrent.CompletableFuture.complete:(Ljava/lang/Object;)Z
pop
2: goto 4
3: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.ext.unit.impl.TestCommand.deployedFuture:Ljava/util/concurrent/CompletableFuture;
aload 2
invokeinterface io.vertx.core.AsyncResult.cause:()Ljava/lang/Throwable;
invokevirtual java.util.concurrent.CompletableFuture.completeExceptionally:(Ljava/lang/Throwable;)Z
pop
4: StackMap locals:
StackMap stack:
aload 1
ifnull 6
5: aload 1
aload 2
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
6: StackMap locals:
StackMap stack:
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lio/vertx/ext/unit/impl/TestCommand;
0 7 2 ar Lio/vertx/core/AsyncResult<Ljava/lang/String;>;
}
SourceFile: "TestCommand.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
RuntimeVisibleAnnotations:
io.vertx.core.cli.annotations.Name(value = "test")
io.vertx.core.cli.annotations.Summary(value = "Runs a Vert.x Unit test called <test-verticle> in its own instance of vert.x.")
io.vertx.core.cli.annotations.Description(value = "Execute Vert.x Unit tests in its own instance of Vert.x. The Verticle must run a Vert.x Unit test suite, for instance:\n\n var TestSuite = require('vertx-unit-js/test_suite');\n var suite = TestSuite.create('my-suite');\n ...\n suite.run()\n\n> vertx test suite.js\n\nThe test command blocks until the suite is fully executed and then exit the JVM with the appropriate code: 0 for success, 1 for failure.\n\nThe test suite execution is also logged directly on the console.\n")