From 49761b2fbff89d076b2e54c715aca2b609fff1bb Mon Sep 17 00:00:00 2001 From: skygo Date: Tue, 4 Sep 2012 12:02:40 +0000 Subject: [PATCH] change scope for constants in unit test git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1380585 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/redback/rbac/cached/CachedRbacManagerTest.java | 7 ++----- .../archiva/redback/rbac/jdo/JdoRbacManagerTest.java | 2 ++ .../archiva/redback/rbac/memory/MemoryRbacManagerTest.java | 2 ++ .../archiva/redback/tests/AbstractRbacManagerTestCase.java | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/redback-rbac/redback-rbac-providers/redback-rbac-cached/src/test/java/org/apache/archiva/redback/rbac/cached/CachedRbacManagerTest.java b/redback-rbac/redback-rbac-providers/redback-rbac-cached/src/test/java/org/apache/archiva/redback/rbac/cached/CachedRbacManagerTest.java index 02553a92..359b9bb6 100644 --- a/redback-rbac/redback-rbac-providers/redback-rbac-cached/src/test/java/org/apache/archiva/redback/rbac/cached/CachedRbacManagerTest.java +++ b/redback-rbac/redback-rbac-providers/redback-rbac-cached/src/test/java/org/apache/archiva/redback/rbac/cached/CachedRbacManagerTest.java @@ -39,11 +39,8 @@ public class CachedRbacManagerTest @Named( value = "rBACManager#cached" ) RBACManager rbacManager; - @BeforeClass - public static void dummyInit() - { - EVENTCOUNT = 1; - } + public static int EVENTCOUNT = 1; // set to 2 because most of test start with eventTracker.rbacInit( true ); => incrementing eventrackercount by one + /* * event count workflow in cachedRbacMaanger is not working like JDO or Memory provider diff --git a/redback-rbac/redback-rbac-providers/redback-rbac-jdo/src/test/java/org/apache/archiva/redback/rbac/jdo/JdoRbacManagerTest.java b/redback-rbac/redback-rbac-providers/redback-rbac-jdo/src/test/java/org/apache/archiva/redback/rbac/jdo/JdoRbacManagerTest.java index ddc92530..60b2f96c 100644 --- a/redback-rbac/redback-rbac-providers/redback-rbac-jdo/src/test/java/org/apache/archiva/redback/rbac/jdo/JdoRbacManagerTest.java +++ b/redback-rbac/redback-rbac-providers/redback-rbac-jdo/src/test/java/org/apache/archiva/redback/rbac/jdo/JdoRbacManagerTest.java @@ -60,6 +60,8 @@ public class JdoRbacManagerTest @Named( value = "rBACManager#jdo" ) RBACManager rbacManager; + public static int EVENTCOUNT = 2; + @Override public void assertEventCount() { diff --git a/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/test/java/org/apache/archiva/redback/rbac/memory/MemoryRbacManagerTest.java b/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/test/java/org/apache/archiva/redback/rbac/memory/MemoryRbacManagerTest.java index 142adb14..8d152005 100644 --- a/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/test/java/org/apache/archiva/redback/rbac/memory/MemoryRbacManagerTest.java +++ b/redback-rbac/redback-rbac-providers/redback-rbac-memory/src/test/java/org/apache/archiva/redback/rbac/memory/MemoryRbacManagerTest.java @@ -42,6 +42,8 @@ public class MemoryRbacManagerTest @Named (value = "rBACManager#memory") RBACManager rbacManager; + public static int EVENTCOUNT = 2; + @Override public void assertEventCount() { diff --git a/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java b/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java index 07cc46fc..132a1b5e 100644 --- a/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java +++ b/redback-rbac/redback-rbac-tests/src/main/java/org/apache/archiva/redback/tests/AbstractRbacManagerTestCase.java @@ -55,7 +55,6 @@ public abstract class AbstractRbacManagerTestCase private RBACDefaults rbacDefaults; - public static int EVENTCOUNT = 2; // set to 2 because most of test start with eventTracker.rbacInit( true ); => incrementing eventrackercount by one public void setRbacManager( RBACManager store ) { this.rbacManager = store;