-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge performance issue between 6.5.2 and 6.11 #1384
Comments
I created two scripts to run the tests with these two versions and the initial results don't reveal anything wrong:
In order to make sure I'm running the exact same tests, I created a
Note that I commented one test, since it fails (missing a file). What this tells me is that if there's a problem, it might be on the IDEA plug-in side but not on the TestNG side. FYI, here are the two scripts:
|
Strange because I reproduced the problem with maven and @cowtowncoder has it with eclipse. |
@cbeust - Here are my test results
|
@cbeust - But when I tried with only the TestNG CLI approach, I noticed that my test results were pretty much the same across both the versions. <?xml version="1.0"?>
<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd">
<suite name="Compress" verbose="2">
<test name="Compress">
<classes>
<class name="com.ning.compress.gzip.TestGzipStreams"/>
<class name="com.ning.compress.gzip.TestGzipUncompressor"/>
<class name="com.ning.compress.lzf.LZFEncoderTest"/>
<class name="com.ning.compress.lzf.TestLZFCompressingInputStream"/>
<class name="com.ning.compress.lzf.TestLZFDecoder"/>
<class name="com.ning.compress.lzf.TestLZFInputStream"/>
<class name="com.ning.compress.lzf.TestLZFOutputStream"/>
<class name="com.ning.compress.lzf.TestLZFRoundTrip"/>
<class name="com.ning.compress.lzf.TestLZFUncompressor"/>
<class name="com.ning.compress.lzf.util.TestFileStreams"/>
</classes>
</test>
</suite>
@juherr - I think the issue is perhaps not with TestNG but with something else. |
@krmahadevan |
@juherr - I didn't run any tests from within an IDE. It was only via maven and then using TestNG CLI. |
@krmahadevan The suite generated by IntelliJ is same as yours: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Default Suite">
<test name="compress-lzf">
<classes>
<class name="com.ning.compress.lzf.util.TestFileStreams"/>
<class name="com.ning.compress.gzip.TestGzipStreams"/>
<class name="com.ning.compress.gzip.TestGzipUncompressor"/>
<class name="com.ning.compress.lzf.TestLZFCompressingInputStream"/>
<class name="com.ning.compress.lzf.TestLZFDecoder"/>
<class name="com.ning.compress.lzf.TestLZFEncoder"/>
<class name="com.ning.compress.lzf.TestLZFInputStream"/>
<class name="com.ning.compress.lzf.TestLZFOutputStream"/>
<class name="com.ning.compress.lzf.TestLZFRoundTrip"/>
<class name="com.ning.compress.lzf.TestLZFUncompressor"/>
</classes>
</test> <!-- compress-lzf -->
</suite> <!-- Default Suite --> |
The biggest perf issue comes from |
Confirm the problem using maven. I've downloaded provided code and run under TestNG 6.8.21 (
Under TestNG 6.11
Under TestNG 6.11 with all
It seems like some changes in Will dig this problem deeper a little bit later. |
Ok. I figured it out. The problem is in polymorphic method I'm not sure if it's worthwhile to put those methods back or not. Anyone? |
@bazhenov I'm not sure to understand what is the difference between static public void assertEquals(final byte[] actual, final byte[] expected) {
assertArrayEquals(actual, expected, null);
} and static public void assertEquals(Object actual, Object expected, String message) {
if (expected != null && expected.getClass().isArray()) {
assertArrayEquals(actual, expected, message);
return;
}
...
} because both methods are calling the same But thanks for the analyze. I will dig about it. |
Actually, no. In 6.8.21 flow ends up in specialized
This code was removed in 66373cd |
O, it makes sense now. Thank! |
@bazhenov - Since you have done all the hard work of analyzing what is causing this issue, it would be great if you could also send a pull request that fixes this. |
I'd like to provide a pull-request if authors don't mind returning those polymorphic methods. |
@bazhenov I suppose we don't have the choice :) Feel free to add the duplication with an explanation of its reason. |
ping @bazhenov . Gentle reminder on the PR part. |
yup, was on a vacation. Will make a patch in spare time. |
- return specialized versions of assertEquals(byte[], byte[])
Maybe we also should add specialized versions of |
You can add them if you want. |
I think it will be more consistent if TestNG provide assert-methods for all possible primitive types. I'll add them. |
Expected behavior
Duration of tests (6.5.2): 2sec on IntelliJ
Actual behavior
Duraction of tests (6.11): 15sec on IntelliJ
Is the issue reproductible on runner?
Test case sample
Just run https://github.com/ning/compress tests
From @cowtowncoder on Twitter: https://twitter.com/cowtowncoder/status/841148403115474944
The text was updated successfully, but these errors were encountered: