[keycloak-dev] Arquillian testsuite: realm import per class now
Marek Posolda
mposolda at redhat.com
Wed Mar 1 06:02:24 EST 2017
So testsuite-arquillian is now using the realm import per class
similarly like the old testsuite. Also there is just one adminClient and
one testingClient per class now.
This was identified as one of the two major bottlenecks (The second was
the phantomjs, which was changed to htmlUnit earlier). With both
changes, running the arquillian testsuite takes 10 minutes instead of 36
on my laptop.
There was quite a lot of changes needed to achieve this as many test
methods relied on the fact that realm is imported and didn't clean stuff
after itself.
I may not fix all the tests, especially not those, which are not
executed during default build (eg. cluster tests). In case that you
found your test is broken you can do either:
- Fix the tests to clean after itself without realm reimport needed
after every test. This is preferred way :)
- Add this to your test class:
@Override
protected boolean isImportAfterEachMethod() {
return true;
}
This is fallback to previous behaviour and will cause the import after
each test method like was before. Hopefully this option can be removed
after some time once all tests are fixed :)
For now, I needed to use it for all adapter tests (added into
AbstractAdapterTest) as some adapter tests were still failing and I
don't have much time to investigate further.. Created
https://issues.jboss.org/browse/KEYCLOAK-4517 .
Marek
More information about the keycloak-dev
mailing list