当b大(2.12.1引数)时引诱@Step(String s,byte [] b)

时间:2019-05-29 09:47:11

标签: java allure

魅力2.12.1 在处理吸引力@Step时遇到内存不足的麻烦 用于大数组字节[]

@Step
public void test(String s, byte[] b){}

这是堆栈跟踪:

java.lang.AssertionError: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:674)
at java.lang.StringBuilder.append(StringBuilder.java:208)
at java.util.Arrays.toString(Arrays.java:4446)
at io.qameta.allure.util.ObjectUtils.toString(ObjectUtils.java:70)
at io.qameta.allure.util.ResultsUtils.createParameter(ResultsUtils.java:110)
at io.qameta.allure.util.AspectUtils.lambda$getParameters$2(AspectUtils.java:63)
at io.qameta.allure.util.AspectUtils$$Lambda$488/432285879.apply(Unknown Source)
at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:693)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at io.qameta.allure.util.AspectUtils.getParameters(AspectUtils.java:64)
at io.qameta.allure.aspects.StepsAspects.stepStart(StepsAspects.java:72)

有没有一种方法可以避免报告所有方法参数?

1 个答案:

答案 0 :(得分:0)

找到关于诱人的烦恼的答案。使用

Allure.step("stepName", (step) -> {})

allure-framework / allure-java#282