X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cass%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fdao%2Faaf%2Ftest%2FAbsJUCass.java;h=7780a1653937a1202fd69f47f093c7313b8c07ea;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=bb0fcd43d8f212c7ac00d12dd1f326f21633f435;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/aaf/test/AbsJUCass.java b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/aaf/test/AbsJUCass.java index bb0fcd43..7780a165 100644 --- a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/aaf/test/AbsJUCass.java +++ b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/aaf/test/AbsJUCass.java @@ -7,9 +7,9 @@ * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at - * * + * * * * http://www.apache.org/licenses/LICENSE-2.0 - * * + * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,7 +50,7 @@ import junit.framework.Assert; /** * Do Setup of Cassandra for Cassandra JUnit Testing - * + * * */ public class AbsJUCass { @@ -63,8 +63,8 @@ public class AbsJUCass { protected static float json = 0.0f; protected static AuthzTrans trans; protected static boolean details = true; - - @BeforeClass + + @BeforeClass public static void startup() throws APIException, IOException { synchronized(AUTHZ) { if (env==null) { @@ -101,14 +101,14 @@ public class AbsJUCass { Assert.fail("Not able to connect to DB: " + e.getLocalizedMessage()); } env.info().log("Connected"); - + // Load special data here - - + + iterations = 0; - + } - + @AfterClass public static void shutdown() { if (cluster!=null) { @@ -120,10 +120,10 @@ public class AbsJUCass { @Before public void newTrans() { trans = env.newTrans(); - + trans.setProperty(CassDAOImpl.USER_NAME, System.getProperty("user.name")); } - + @After public void auditTrail() { if (totals==0) { // "updateTotals()" was not called... just do one Trans @@ -144,7 +144,7 @@ public class AbsJUCass { } } } - + protected void updateTotals() { Metric metric = trans.auditTrail(0, null, Env.JSON, Env.REMOTE); totals+=metric.total; @@ -163,7 +163,7 @@ public class AbsJUCass { } env.info().log( "Total time:", - totals, + totals, "JSON time:", json, "REMOTE time:", @@ -174,10 +174,10 @@ public class AbsJUCass { transTime ); } - + /** * Take a User/Pass and turn into an MD5 Hashed BasicAuth - * + * * @param user * @param pass * @return