On this same topic, I thought I had fixed all places calling Document#getName() but apparently not:
ghts] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 20:/templates/getusersandgroups.vm@146,46 10:47:06.975 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:06,975 [http://host.testcontainers.internal:8080/xwiki/bin/get/testCreateAndDeleteGroup/WebHome?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiRights] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46 10:47:10.741 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:10,741 [http://host.testcontainers.internal:8080/xwiki/bin/view/XWiki/XWikiPreferences?xpage=getgroups&offset=1&limit=15&reqNo=1] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 242:/templates/getgroups.vm@38,24 10:47:10.745 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:10,745 [http://host.testcontainers.internal: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 242:/templates/getgroups.vm@62,37 10:47:15.140 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:15,140 [http://host.testcontainers.internal:8080/xwiki/bin/get/XWiki/XWikiPreferences?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiGlobalRights] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46 10:47:16.595 [Exec Stream Pumper] ERROR o.x.t.i.XWikiLogOutputStream - 2019-03-29 10:47:16,595 [http://host.testcontainers.internal:8080/xwiki/bin/get/testCreateAndDeleteGroup/WebHome?xpage=getusersandgroups&offset=1&limit=10&reqNo=1&uorg=groups&wiki=local&clsname=XWiki.XWikiRights] WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in 17:/templates/getusersandgroups.vm@146,46 And it’s not failing our jobs… Thanks -Vincent > On 29 Mar 2019, at 10:27, Vincent Massol <[email protected]> wrote: > > Hi devs, > > I'd like to discuss about introducing a checker in the tests to fail the test > if there's a warning message about a deprecated APIs being used in scripts. > > For example: > > ``` > 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. > > WDYT? > > Thanks > -Vincent

