Skip to content
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

#417 #423

Merged
merged 3 commits into from
Mar 12, 2020
Merged

#417 #423

merged 3 commits into from
Mar 12, 2020

Conversation

HDouss
Copy link
Contributor

@HDouss HDouss commented Mar 10, 2020

Resolving issue #417
Added LCOM4 test cases.
(fixed expected value for MethodMethodCalls)

@0crat
Copy link
Collaborator

0crat commented Mar 10, 2020

@paulodamaso/z everybody who has role REV is banned at #423; I won't be able to assign anyone automatically; consider assigning someone manually (as in §19), or invite more people (as in §51), or remove the job from the scope (as in §14)

@paulodamaso
Copy link
Collaborator

@0crat assign @fanifieiev

@0crat
Copy link
Collaborator

0crat commented Mar 11, 2020

@0crat assign @fanifieiev (here)

@paulodamaso This pull request #423 is assigned to @fanifieiev/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @paulodamaso/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be no monetary reward for this job

Copy link

@fevzian fevzian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss Please have a look at my comments

@Disabled
public void methodMethodCalls() throws Exception {
@CsvFileSource(resources = "/org/jpeek/calculus/java/lcom4-params.csv")
public void methodMethodCalls(final String file, final String value) throws Exception {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss I know that is not your change, but please change the name of the method to a meaningful one

@Disabled
public void methodMethodCalls() throws Exception {
@CsvFileSource(resources = "/org/jpeek/calculus/java/lcom4-params.csv")
public void methodMethodCalls(final String file, final String value) throws Exception {
final XML result = new Lcom4().node(
Copy link

@fevzian fevzian Mar 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss I think Lcom4 should have a constructor or several constructors to accept parameters and the only its interfaced method node should be parameterless.
I mean, Calculus should have:

public interface Calculus {
   
    XML node()
        throws IOException;

}

and Lcom4 should have a cosntructor to accept the values.

So, I suggest leaving a todo

final XML result = new Lcom4().node(
"", new HashMap<>(0), new Skeleton(
new FakeBase("MethodMethodCalls")
new FakeBase(file)
).xml()
);
new Assertion<>(
"Must create LCOM4 value",
result.xpath("/metric/app/package/class/@value").get(0),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss The Cactoos has ItemAt scalar, so you could use it like an elegant way:
new ItemAt(0, result.xpath("/metric/app/package/class/@value"))
and test scalars

@HDouss
Copy link
Contributor Author

HDouss commented Mar 11, 2020

@fanifieiev Actually all your 3 comments are not related to the issue or the PR. I fixed comment 1&3. The comment 2 (about node interface method): I am not sure this is a good idea + this is a rather big refactoring as it will affect xsl calculus as well, along their usages: metrics classes, App class, Test classes... Please submit a new issue so the ARC could state if it is a good idea (also because it is unrelated to that issue).

@fevzian
Copy link

fevzian commented Mar 11, 2020

@fanifieiev Actually all your 3 comments are not related to the issue or the PR. I fixed comment 1&3. The comment 2 (about node interface method): I am not sure this is a good idea + this is a rather big refactoring as it will affect xsl calculus as well, along their usages: metrics classes, App class, Test classes... Please submit a new issue so the ARC could state if it is a good idea (also because it is unrelated to that issue).

@HDouss I know it might not be related to this PR, but, reviewing even the old code seen in PRs, helps the reviewer detect potential design problems and ask DEV to leave a todo.
So, I personally think, that making such comments is a good practice.
@paulodamaso WDYT???

@HDouss
Copy link
Contributor Author

HDouss commented Mar 11, 2020

@paulodamaso ping

@paulodamaso
Copy link
Collaborator

paulodamaso commented Mar 12, 2020

@fanifieiev Actually all your 3 comments are not related to the issue or the PR. I fixed comment 1&3. The comment 2 (about node interface method): I am not sure this is a good idea + this is a rather big refactoring as it will affect xsl calculus as well, along their usages: metrics classes, App class, Test classes... Please submit a new issue so the ARC could state if it is a good idea (also because it is unrelated to that issue).

@HDouss I know it might not be related to this PR, but, reviewing even the old code seen in PRs, helps the reviewer detect potential design problems and ask DEV to leave a todo.
So, I personally think, that making such comments is a good practice.
@paulodamaso WDYT???

@fanifieiev In this case I think that it's better that you open an issue and get the payment for bug report. Asking the DEV to leave a puzzle don't earn you the payment for this bug.

Usually we ask the performer to leave puzzles when the budget for the PR was already spent (30 min) but there are some features still missing.

@fevzian
Copy link

fevzian commented Mar 12, 2020

@fanifieiev Actually all your 3 comments are not related to the issue or the PR. I fixed comment 1&3. The comment 2 (about node interface method): I am not sure this is a good idea + this is a rather big refactoring as it will affect xsl calculus as well, along their usages: metrics classes, App class, Test classes... Please submit a new issue so the ARC could state if it is a good idea (also because it is unrelated to that issue).

@HDouss I know it might not be related to this PR, but, reviewing even the old code seen in PRs, helps the reviewer detect potential design problems and ask DEV to leave a todo.
So, I personally think, that making such comments is a good practice.
@paulodamaso WDYT???

@fanifieiev In this case I think that it's better that you open an issue and get the payment for bug report. Asking the DEV to leave a puzzle don't earn you the payment for this bug.

Usually we ask the performer to leave puzzles when the budget for the PR was already spent (30 min) but there are some features still missing.

@paulodamaso OK)))

Copy link

@fevzian fevzian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss One more comment

result.xpath("/metric/app/package/class/@value").get(0),
new IsEqual<>("1")
new ItemAt<>(0, result.xpath("/metric/app/package/class/@value")).value(),
new IsEqual<>(value)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HDouss Please use ScalarHasValue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fanifieiev fixed

@HDouss
Copy link
Contributor Author

HDouss commented Mar 12, 2020

@fanifieiev Please review again

Copy link

@fevzian fevzian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulodamaso Please merge

@HDouss
Copy link
Contributor Author

HDouss commented Mar 12, 2020

@paulodamaso ping

@paulodamaso
Copy link
Collaborator

@HDouss Thank you

@paulodamaso
Copy link
Collaborator

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@HDouss @paulodamaso Oops, I failed. You can see the full log here (spent 9min)

Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.\u001b[m\u001b[m
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:215\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:156\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:148\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
\u001b[1mCaused by\u001b[m: org.apache.maven.plugin.MojoFailureException: \u001b[1;31mThere are test failures.

Please refer to /home/r/repo/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.\u001b[m
    \u001b[1mat\u001b[m org.apache.maven.plugin.surefire.SurefireHelper.throwException (\u001b[1mSurefireHelper.java:289\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.surefire.SurefireHelper.reportExecution (\u001b[1mSurefireHelper.java:161\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary (\u001b[1mSurefirePlugin.java:364\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (\u001b[1mAbstractSurefireMojo.java:1041\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (\u001b[1mAbstractSurefireMojo.java:857\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (\u001b[1mDefaultBuildPluginManager.java:137\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:210\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:156\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.MojoExecutor.execute (\u001b[1mMojoExecutor.java:148\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:117\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (\u001b[1mLifecycleModuleBuilder.java:81\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (\u001b[1mSingleThreadedBuilder.java:56\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.lifecycle.internal.LifecycleStarter.execute (\u001b[1mLifecycleStarter.java:128\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:305\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.doExecute (\u001b[1mDefaultMaven.java:192\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.DefaultMaven.execute (\u001b[1mDefaultMaven.java:105\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.execute (\u001b[1mMavenCli.java:956\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.doMain (\u001b[1mMavenCli.java:288\u001b[m)
    \u001b[1mat\u001b[m org.apache.maven.cli.MavenCli.main (\u001b[1mMavenCli.java:192\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke0 (\u001b[1mNative Method\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.NativeMethodAccessorImpl.invoke (\u001b[1mNativeMethodAccessorImpl.java:62\u001b[m)
    \u001b[1mat\u001b[m sun.reflect.DelegatingMethodAccessorImpl.invoke (\u001b[1mDelegatingMethodAccessorImpl.java:43\u001b[m)
    \u001b[1mat\u001b[m java.lang.reflect.Method.invoke (\u001b[1mMethod.java:498\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (\u001b[1mLauncher.java:282\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.launch (\u001b[1mLauncher.java:225\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (\u001b[1mLauncher.java:406\u001b[m)
    \u001b[1mat\u001b[m org.codehaus.plexus.classworlds.launcher.Launcher.main (\u001b[1mLauncher.java:347\u001b[m)
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] Re-run Maven using the \u001b[1m-X\u001b[m switch to enable full debug logging.
[\u001b[1;31mERROR\u001b[m] 
[\u001b[1;31mERROR\u001b[m] For more information about the errors and possible solutions, please read the following articles:
[\u001b[1;31mERROR\u001b[m] \u001b[1m[Help 1]\u001b[m http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
container f2406b29375815cf04ca32b472a03a864da23d15a1f6614e3f96a118e0ce3c98 is dead
Thu Mar 12 17:31:29 CET 2020

@HDouss
Copy link
Contributor Author

HDouss commented Mar 12, 2020

@paulodamaso seems we still have problems with rultor

@paulodamaso
Copy link
Collaborator

@HDouss Yes, I'm trying to fix it since last week.

@paulodamaso
Copy link
Collaborator

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@HDouss @paulodamaso Oops, I failed. You can see the full log here (spent 2min)

-rw-rw-r--  1 rultor rultor    444 Mar 12 18:01 end.sh
-rwxrwxr-x  1 rultor rultor    363 Mar 12 18:01 entry.sh
-rw-rw-r--  1 rultor rultor   1679 Mar 12 18:01 id_rsa
-rw-rw-r--  1 rultor rultor    396 Mar 12 18:00 id_rsa.pub
-rw-rw-r--  1 rultor rultor      6 Mar 12 18:01 pid
-rw-rw-r--  1 rultor rultor   1192 Mar 12 18:00 pubring.gpg
drwxrwxr-x  8 rultor rultor   4096 Mar 12 18:01 repo
-rwxrwxr-x  1 rultor rultor   5996 Mar 12 18:01 run.sh
-rw-rw-r--  1 rultor rultor    648 Mar 12 18:01 script.sh
-rw-rw-r--  1 rultor rultor   2570 Mar 12 18:00 secring.gpg
-rw-rw-r--  1 rultor rultor   1077 Mar 12 18:00 settings.xml
-rw-rw-r--  1 rultor rultor   6113 Mar 12 18:01 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-oSoL:/main [email protected]:yegor256/jpeek.git --env=pull_id=423 [email protected]:HDouss/jpeek.git --env=fork_branch=#417 --env=head_branch=master --env=pull_title=#417 --env=author=paulodamaso '--env=scripts=( '\''export '\''\'\'''\''[email protected]:yegor256/jpeek.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=423'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''[email protected]:HDouss/jpeek.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=#417'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=#417'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=paulodamaso'\''\'\'''\'''\'' '\'';'\'' '\''export LC_ALL=en_US.UTF-8'\'' '\'';'\'' '\''export LANG=en_US.UTF-8'\'' '\'';'\'' '\''export LANGUAGE=en_US.UTF-8'\'' '\'';'\'' '\''ln -s /usr/lib/jvm/java-1.8-openjdk/bin/javac /usr/bin/javac'\'' '\'';'\'' '\''pdd -f /dev/null'\'' '\'';'\'' '\''mvn clean install -Pqulice --errors --settings ../settings.xml'\'' '\'';'\'' '\''mvn clean site -Psite --errors --settings ../settings.xml'\'' '\'';'\'' )' --hostname=docker --privileged --memory=6g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-oSoL/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=yegor256_jpeek_423 g4s8/rultor:alpine3.10 /main/entry.sh
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
Creating mailbox file: No such file or directory
+ usermod -s /bin/bash r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bundle /root/.gem /root/.wget-hsts /root/empty /home/r
+ cp -R ./cid ./end.sh ./entry.sh ./id_rsa ./id_rsa.pub ./pid ./pubring.gpg ./repo ./run.sh ./script.sh ./secring.gpg ./settings.xml ./stdout /home/r
+ rm -rf repo
+ chown -R r:r /home/r
+ chmod a+x /home/r/script.sh
+ su --login r --command /home/r/script.sh
+ set -e
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'sudo=sudo -i'
+ export HOME=/home/r
+ HOME=/home/r
+ cd /home/r/repo
+ export [email protected]:yegor256/jpeek.git
+ [email protected]:yegor256/jpeek.git
+ export pull_id=423
+ pull_id=423
+ export [email protected]:HDouss/jpeek.git
+ [email protected]:HDouss/jpeek.git
+ export fork_branch=#417
+ fork_branch='#417'
+ export head_branch=master
+ head_branch=master
+ export pull_title=#417
+ pull_title='#417'
+ export author=paulodamaso
+ author=paulodamaso
+ export LC_ALL=en_US.UTF-8
+ LC_ALL=en_US.UTF-8
+ export LANG=en_US.UTF-8
+ LANG=en_US.UTF-8
+ export LANGUAGE=en_US.UTF-8
+ LANGUAGE=en_US.UTF-8
+ ln -s /usr/lib/jvm/java-1.8-openjdk/bin/javac /usr/bin/javac
ln: /usr/bin/javac: Permission denied
container d65fd005c1232e286ae5fc901907210934fb6e6a3729cd0c7c0bc5d49897b4dd is dead
Thu Mar 12 18:03:08 CET 2020

@paulodamaso
Copy link
Collaborator

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@paulodamaso OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit dc1b98d into cqfn:master Mar 12, 2020
@rultor
Copy link
Collaborator

rultor commented Mar 12, 2020

@rultor merge

@paulodamaso Done! FYI, the full log is here (took me 22min)

@0crat 0crat removed the scope label Mar 12, 2020
@0crat
Copy link
Collaborator

0crat commented Mar 12, 2020

Job was finished in 27 hours, bonus for fast delivery is possible (see §36)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants