Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16377

Fail the build when a deprecated velocity API is used in tests

    XMLWordPrintable

Details

    • Unknown
    • N/A

    Description

      For ex:

      23:59:28.308 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup started
      23:59:32.593 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:32,593 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37 
      23:59:35.824 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:35,824 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=2] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 18:/templates/getgroups.vm@62,37 
      23:59:41.349 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-28 23:59:41,348 [http://localhost:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=3] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.plugin.rightsmanager.RightsManagerPluginApi.countAllMembersNamesForGroup] in 21:/templates/getgroups.vm@62,37 
      23:59:58.503 [main] INFO  org.xwiki.test.ui.TestDebugger - GroupIT-addUserAndSubgroupToGroup passed
      

      Rationale:

      • This adds warnings in the xwiki logs when users navigate to those pages which isn’t nice.
      • It also helps reducing the number of deprecated methods we use (I have the feeling this is not reducing) and helps us move towards being able to move the deprecated code to legacy.

      Proposal thread: https://markmail.org/message/udbnfth33h4xu34v

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: