arquillian UnsupportedOperationException when use InSequence annotation

ⅰ亾dé卋堺 提交于 2019-12-06 11:44:32

The problem was in JUnit. I used version 4.12-beta-1 which returns unmodifiable list in this method:

public List<FrameworkMethod> getAnnotatedMethods(
        Class<? extends Annotation> annotationClass) {
    return Collections.unmodifiableList(getAnnotatedMembers(methodsForAnnotations, annotationClass, false));
}

Class org.junit.runners.model.TestClass.

I downgraded to version JUnit 4.11 and all test was runned without problems with annotation @InSequence.

The same with me. Even with the 4.12 final version of Junit. As workaround in my case I extend the Arquillian class and override the method getChildren. Then, the main difference is convert the unmodifiable colletion to a modified.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!