Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14043

Javac warnings false positive from unit test log

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Some logs from unit test execution are wrongly taken by the Warnings Plugin as javac compiler warnings. Those (French) logs are from the app itself.

      Two examples from "Details" tab

      10:53:05,516 [INFO] - info.XXX.YYY.persistence.entity.scenario.RemplaceAffectation : _____________doProjette(this: RemplaceAffectation {id: 1, ligne:Ligne {nom: Ligne 2}, entite:Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, quantite:4}, pivot: Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations, Java Compiler (javac), Priority: Normale 
      
      }, projection: ConceptDto {id:2, nom:p2, caracteristiques: {}, affectations: {}}, date: 05/01/2012)
      
      
      10:53:07,084 [ERROR] - info.XXX.YYY.service.entite.EntiteService : On trouve plusieurs resultats pour findByField(fieldName:nom, value:aa, klass:class info.stif.mr1.persistence.entity.entite.Entite): results=[Modele {id:101, nom: aa, generalisation:, specialisations:[], archetype:1, prototypes:[201], constituants:[], caracteristiques:[]}, Modele {id:102, nom: aa, generalisation:, specialisations:[], archetype:2, prototypes:[], constituants:[], caracteristiques:[]}, Concept {id:1, nom:aa, generalisation:, specialisations:[], prototypes:[101], constituants:[], caracteristiques:[], affectations:[]}, Concept {id:2, nom:aa, generalisation:, specialisations:[], prototypes:[102], constituants:[], caracteristiques:[], affectations, Java Compiler (javac), Priority: Normale
      
      }, info.stif.mr1.persistence.entity.entite.ObjetConcret@2a6cd712]
      

        Attachments

          Activity

          Hide
          tommy Tommy Molen added a comment -

          Have almost the same problem. In our case it seems like the parsing of output that contains brackets can be misinterpreted.

          Typical example:
          [junit] <misc junit stdout printout> [data within brackets] [] empty bracket

          The data within brackets can be interpreted as a file name. It gets listed in the file list and the file name is part of what is written inside the brackets.

          Show
          tommy Tommy Molen added a comment - Have almost the same problem. In our case it seems like the parsing of output that contains brackets can be misinterpreted. Typical example: [junit] <misc junit stdout printout> [data within brackets] [] empty bracket The data within brackets can be interpreted as a file name. It gets listed in the file list and the file name is part of what is written inside the brackets.
          Hide
          drulli Ulli Hafner added a comment -

          Is this the console message that is parsed? OR the output of the warnings plug-in? I need the exact message from the console log...

          Show
          drulli Ulli Hafner added a comment - Is this the console message that is parsed? OR the output of the warnings plug-in? I need the exact message from the console log...
          Hide
          turb Sylvain Veyrié added a comment -

          For my part, this is the output from the warnings plug-in. I could not find the exact line from the log, but I have some with the form:

          10:21:09,144 [INFO] - info.XXX.YYY.persistence.entity.scenario.RemplaceAffectation : _____________doProjette(this: RemplaceAffectation {id: 1, ligne:Ligne {nom: Ligne 2}, entite:Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, quantite:4}, pivot: Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, projection: ConceptDto {id:2, nom:p2, caracteristiques: {}, affectations: {}}, date: 06/01/2012) 
          ___________________actual.getAffectations(): {}
          

          So by reconstruction, the format of the corresponding lines should be:

          10:53:05,516 [INFO] - info.XXX.YYY.persistence.entity.scenario.RemplaceAffectation : _____________doProjette(this: RemplaceAffectation {id: 1, ligne:Ligne {nom: Ligne 2}, entite:Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, quantite:4}, pivot: Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations: []}, projection: ConceptDto {id:2, nom:p2, caracteristiques: {}, affectations: {}}, date: 05/01/2012)
          
          
          10:53:07,084 [ERROR] - info.XXX.YYY.service.entite.EntiteService : On trouve plusieurs resultats pour findByField(fieldName:nom, value:aa, klass:class info.stif.mr1.persistence.entity.entite.Entite): results=[Modele {id:101, nom: aa, generalisation:, specialisations:[], archetype:1, prototypes:[201], constituants:[], caracteristiques:[]}, Modele {id:102, nom: aa, generalisation:, specialisations:[], archetype:2, prototypes:[], constituants:[], caracteristiques:[]}, Concept {id:1, nom:aa, generalisation:, specialisations:[], prototypes:[101], constituants:[], caracteristiques:[], affectations:[]}, Concept {id:2, nom:aa, generalisation:, specialisations:[], prototypes:[102], constituants:[], caracteristiques:[], affectations: []}, info.stif.mr1.persistence.entity.entite.ObjetConcret@2a6cd712]
          

          Reading this, I think the problem is parsing this: []} - last double bracket before the curly brace.

          Show
          turb Sylvain Veyrié added a comment - For my part, this is the output from the warnings plug-in. I could not find the exact line from the log, but I have some with the form: 10:21:09,144 [INFO] - info.XXX.YYY.persistence.entity.scenario.RemplaceAffectation : _____________doProjette(this: RemplaceAffectation {id: 1, ligne:Ligne {nom: Ligne 2}, entite:Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, quantite:4}, pivot: Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, projection: ConceptDto {id:2, nom:p2, caracteristiques: {}, affectations: {}}, date: 06/01/2012) ___________________actual.getAffectations(): {} So by reconstruction, the format of the corresponding lines should be: 10:53:05,516 [INFO] - info.XXX.YYY.persistence.entity.scenario.RemplaceAffectation : _____________doProjette(this: RemplaceAffectation {id: 1, ligne:Ligne {nom: Ligne 2}, entite:Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations:[]}, quantite:4}, pivot: Concept {id:2, nom:p2, generalisation:, specialisations:[], prototypes:[], constituants:[], caracteristiques:[], affectations: []}, projection: ConceptDto {id:2, nom:p2, caracteristiques: {}, affectations: {}}, date: 05/01/2012) 10:53:07,084 [ERROR] - info.XXX.YYY.service.entite.EntiteService : On trouve plusieurs resultats pour findByField(fieldName:nom, value:aa, klass:class info.stif.mr1.persistence.entity.entite.Entite): results=[Modele {id:101, nom: aa, generalisation:, specialisations:[], archetype:1, prototypes:[201], constituants:[], caracteristiques:[]}, Modele {id:102, nom: aa, generalisation:, specialisations:[], archetype:2, prototypes:[], constituants:[], caracteristiques:[]}, Concept {id:1, nom:aa, generalisation:, specialisations:[], prototypes:[101], constituants:[], caracteristiques:[], affectations:[]}, Concept {id:2, nom:aa, generalisation:, specialisations:[], prototypes:[102], constituants:[], caracteristiques:[], affectations: []}, info.stif.mr1.persistence.entity.entite.ObjetConcret@2a6cd712] Reading this, I think the problem is parsing this: []} - last double bracket before the curly brace.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/warnings/parser/JavacParser.java
          src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java
          src/test/resources/hudson/plugins/warnings/parser/issue14043.txt
          http://jenkins-ci.org/commit/warnings-plugin/213661931bd2d7cebfe3106bc3a1ad175077d57f
          Log:
          [FIXED JENKINS-14043] Fixed some false positives for Javac parser.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/warnings/parser/JavacParser.java src/test/java/hudson/plugins/warnings/parser/JavacParserTest.java src/test/resources/hudson/plugins/warnings/parser/issue14043.txt http://jenkins-ci.org/commit/warnings-plugin/213661931bd2d7cebfe3106bc3a1ad175077d57f Log: [FIXED JENKINS-14043] Fixed some false positives for Javac parser.
          Hide
          tommy Tommy Molen added a comment -

          The raw console output from my sample is something like
          [junit] G GOT < + 120512,21:18:18.005->120512,21:18:18.632 Ab Micid:192.168.0.1 0 2 PEAK_REPORT(3) PSS:12253413403527718 status=NORMAL issi=123456789012345 ssisfn=123456789012 Contexts:[] cpn=mylabs RET=3

          Show
          tommy Tommy Molen added a comment - The raw console output from my sample is something like [junit] G GOT < + 120512,21:18:18.005->120512,21:18:18.632 Ab Micid:192.168.0.1 0 2 PEAK_REPORT(3) PSS:12253413403527718 status=NORMAL issi=123456789012345 ssisfn=123456789012 Contexts:[] cpn=mylabs RET=3
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/test/resources/hudson/plugins/warnings/parser/issue14043.txt
          http://jenkins-ci.org/commit/warnings-plugin/a18d01cc194d48742a20f4e40b8e357ab3e5a9fe
          Log:
          JENKINS-14043 Improved JUnit test.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/resources/hudson/plugins/warnings/parser/issue14043.txt http://jenkins-ci.org/commit/warnings-plugin/a18d01cc194d48742a20f4e40b8e357ab3e5a9fe Log: JENKINS-14043 Improved JUnit test.
          Hide
          turb Sylvain Veyrié added a comment -

          It is fixed for us in 4.6. Thanks!

          Show
          turb Sylvain Veyrié added a comment - It is fixed for us in 4.6. Thanks!
          Hide
          tommy Tommy Molen added a comment -

          It is fixed for us as well, thank you.

          Show
          tommy Tommy Molen added a comment - It is fixed for us as well, thank you.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              turb Sylvain Veyrié
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: