Skip to content

Commit

Permalink
Merge pull request #99 from nit-tripathi/dev
Browse files Browse the repository at this point in the history
Commenting out all print statements
  • Loading branch information
NeetishPathak committed May 12, 2023
2 parents 26964d9 + 2bffc4c commit cab57c9
Show file tree
Hide file tree
Showing 24 changed files with 102 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ public void testBatchCreateTTLmorethan3days() throws JunoException{
if ( mkey.equals(new String(key[1]))) {
AssertJUnit.assertEquals (OperationStatus.IllegalArgument, mResponse.getStatus());
} else {
System.out.println("Record version:"+mResponse.getVersion());
//System.out.println("Record version:"+mResponse.getVersion());
//AssertJUnit.assertTrue(1 == mResponse.getVersion());
AssertJUnit.assertEquals (OperationStatus.Success,mResponse.getStatus());
i++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void testBatchDestroy129BytesKey() throws JunoException{
key[i] = DataGenUtils.createKey(DataGenUtils.rand(r, 1, 128)).getBytes();
key[4] = DataGenUtils.createKey(129).getBytes();

System.out.println("key " + i + "is " + new String(key[i]));
//System.out.println("key " + i + "is " + new String(key[i]));
payload[i] = DataGenUtils.genBytes(DataGenUtils.rand(r, 1, 1028));
JunoRequest item1 = new JunoRequest(key[i], payload[i], (long)0, (long)0, JunoRequest.OperationType.Destroy);
list.add(item1);
Expand All @@ -308,7 +308,7 @@ public void testBatchDestroy129BytesKey() throws JunoException{
int i = 0;
for (JunoResponse response: resp) {
String mkey = new String(response.getKey());
System.out.println("vera mkey is " + mkey + "key 4 is " + (new String(key[4])));
//System.out.println("vera mkey is " + mkey + "key 4 is " + (new String(key[4])));
if ( mkey.equals(new String(key[4]))) {
AssertJUnit.assertEquals (OperationStatus.IllegalArgument, response.getStatus());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public void testBatchSetNoLifeTime() throws JunoException{
AssertJUnit.assertTrue(1 == response.getVersion());
AssertJUnit.assertEquals (OperationStatus.Success, response.getStatus());
AssertJUnit.assertEquals (new String(payload[i]), new String (response.getValue()));
System.out.println("TTL in Response :"+response.getTtl());
//System.out.println("TTL in Response :"+response.getTtl());
AssertJUnit.assertTrue (1800 - 8 <= response.getTtl() && response.getTtl() <= 1800);
}
LOGGER.info("0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ public void testBatchSetEmptyKeys() throws JunoException{
key[9] = "".getBytes();
String str = "Hello Testing testing " + i;
payload[i] = str.getBytes();
System.out.println("Vera: i is " + i + ", key[i] is " + new String(key[i]));
//System.out.println("Vera: i is " + i + ", key[i] is " + new String(key[i]));
JunoRequest item = new JunoRequest(key[i], payload[i], (long)0, ttl[i], JunoRequest.OperationType.Set);
list.add(item);
}
try{
for (int i = 0; i < numKeys; i ++) {
System.out.println("Vera2: i is " + i + ", key[i] is " + new String(key[i]));
//System.out.println("Vera2: i is " + i + ", key[i] is " + new String(key[i]));
}
LOGGER.debug("\n===Batch Set is sent ");
Iterable<JunoResponse> batchResp;
Expand All @@ -227,7 +227,7 @@ public void testBatchSetEmptyKeys() throws JunoException{
}
for (JunoResponse response: batchResp) {
if (response != null && response.getKey() != null && response.getKey() != key[9]) {
System.out.println("Vera: mkey is " + new String(response.getKey()));
//System.out.println("Vera: mkey is " + new String(response.getKey()));
AssertJUnit.assertEquals (OperationStatus.Success, response.getStatus());
} else {
AssertJUnit.assertEquals (OperationStatus.IllegalArgument, response.getStatus());
Expand Down Expand Up @@ -822,7 +822,7 @@ public void testBatchSetNoLifeTime() throws JunoException{
AssertJUnit.assertTrue(1 == response.getVersion());
AssertJUnit.assertEquals (OperationStatus.Success, response.getStatus());
AssertJUnit.assertEquals (new String(payload[i]), new String (response.getValue()));
System.out.println("TTL in Response :"+response.getTtl());
//System.out.println("TTL in Response :"+response.getTtl());
AssertJUnit.assertTrue (1800 - 8 <= response.getTtl() && response.getTtl() <= 1800);
}
LOGGER.info("0");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public void testCUpdateWithMorethan3DaysLifetime() throws JunoException, IOExcep
AssertJUnit.assertTrue ("Exception is NOT seen for when lifetime is set to > 3 days", false);
}catch(Exception mex){
LOGGER.debug(mex.getCause().getMessage());
System.out.println("Exception :"+mex.getCause().getMessage());
//System.out.println("Exception :"+mex.getCause().getMessage());
AssertJUnit.assertTrue(mex.getCause().getMessage().contains("Invalid lifetime. current lifetime=259201, max configured lifetime=259200"));
LOGGER.info("Exception", mex.getMessage());
LOGGER.info("ERROR");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void setup() throws JunoException, IOException, InterruptedException, Cer
try{
junoClient6 = JunoClientFactory.newJunoClient(new JunoPropertiesProvider(pConfig), SSLUtil.getSSLContext());
}catch(Exception e){
System.out.println("Exception in constructor :"+e.getMessage());
//System.out.println("Exception in constructor :"+e.getMessage());
}

pConfig.setProperty(JunoProperties.PORT, "8080");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void setup() throws JunoException, IOException, InterruptedException {

@AfterClass
public void teardown() {
System.out.println("Calling teardown");
//System.out.println("Calling teardown");

sfxRegistry.close();
simpleMeterRegistry.close();
Expand All @@ -118,7 +118,7 @@ public void beforeEach() {
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("Calling BeforeEach");
//System.out.println("Calling BeforeEach");
simpleMeterRegistry = new SimpleMeterRegistry();
Metrics.globalRegistry.add(simpleMeterRegistry);
}
Expand All @@ -130,7 +130,7 @@ public void afterEach() {
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("Calling AfterEach");
//System.out.println("Calling AfterEach");
simpleMeterRegistry.clear();
simpleMeterRegistry.close();
Metrics.globalRegistry.remove(simpleMeterRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public void testCUpdateWithMorethan3DaysLifetime() throws JunoException, IOExcep
AssertJUnit.assertTrue ("Exception is NOT seen for when lifetime is set to > 3 days", false);
}catch(Exception mex){
LOGGER.debug(mex.getCause().getMessage());
System.out.println("Exception :"+mex.getCause().getMessage());
//System.out.println("Exception :"+mex.getCause().getMessage());
AssertJUnit.assertTrue(mex.getCause().getMessage().contains("Invalid lifetime. current lifetime=259201, max configured lifetime=259200"));
LOGGER.info("Exception", mex.getMessage());
LOGGER.info("ERROR");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public void testDestroyNoKeyExists() throws JunoException, IOException{
AssertJUnit.assertEquals(OperationStatus.Success, deleteResponse.getStatus());
JunoResponse deleteResponse1 = junoReactClient.delete(key1.getBytes()).block();
AssertJUnit.assertEquals(OperationStatus.Success, deleteResponse1.getStatus());
System.out.println("Key size:"+key2.getBytes().length);
//System.out.println("Key size:"+key2.getBytes().length);
JunoResponse deleteResponse2 = junoReactClient.delete(key2.getBytes()).block();
AssertJUnit.assertEquals (OperationStatus.Success, deleteResponse2.getStatus());
AssertJUnit.assertEquals(key, deleteResponse.getKey());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void testsetWithoutTTL() throws JunoException, IOException {
AssertJUnit.assertTrue(2 == junoResponse.getVersion());
AssertJUnit.assertEquals(new String(data), new String(junoResponse.getValue()));
AssertJUnit.assertTrue(junoResponse.getTtl() >= (prop.getDefaultLifetime() - 4) && junoResponse.getTtl() <= prop.getDefaultLifetime());
System.out.println("TTL now is:"+junoResponse.getTtl());
//System.out.println("TTL now is:"+junoResponse.getTtl());

LOGGER.info("0");
LOGGER.info("Completed");
Expand Down Expand Up @@ -488,7 +488,7 @@ public void testsetWithZeroLifetime() throws JunoException, Exception{
AssertJUnit.assertEquals (OperationStatus.Success, mResponse.getStatus());
JunoResponse mResponse1 = junoReactClient1.get(key).block();
AssertJUnit.assertEquals (OperationStatus.Success, mResponse1.getStatus());
System.out.println("lifetime for junoReactClient1 is " + mResponse1.getTtl());
//System.out.println("lifetime for junoReactClient1 is " + mResponse1.getTtl());
LOGGER.debug("lifetime for junoReactClient1 is " + mResponse1.getTtl() + ", default is " + prop.getDefaultLifetime());
AssertJUnit.assertEquals(1,mResponse1.getVersion());
AssertJUnit.assertEquals(data.length, mResponse1.getValue().length);
Expand Down Expand Up @@ -1043,7 +1043,7 @@ public void testSetWithCompressionCrossMayfly() throws Exception {
junoResponse = junoReactClient.get(key).block();
AssertJUnit.assertEquals (OperationStatus.Success,junoResponse.getStatus());
AssertJUnit.assertEquals(key, junoResponse.key());
System.out.println ("Vera version is " + junoResponse.getVersion());
//System.out.println ("Vera version is " + junoResponse.getVersion());
AssertJUnit.assertTrue(1 == junoResponse.getVersion());
AssertJUnit.assertEquals(data.length, junoResponse.getValue().length);
AssertJUnit.assertEquals(new String(data), new String(junoResponse.getValue()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void testsetWithoutTTL() throws JunoException, IOException {
junoResponse = junoClient.get(key); // It will show that 10 sec has elapsed from original TTL
AssertJUnit.assertEquals(OperationStatus.Success, junoResponse.getStatus());
AssertJUnit.assertTrue(junoResponse.getTtl() >= (prop.getDefaultLifetime()-14) && (junoResponse.getTtl() <= prop.getDefaultLifetime()-10));
System.out.println("TTL now is:"+junoResponse.getTtl());
//System.out.println("TTL now is:"+junoResponse.getTtl());

junoResponse = junoClient.set(key, data);
AssertJUnit.assertEquals(OperationStatus.Success, junoResponse.getStatus());
Expand All @@ -233,7 +233,7 @@ public void testsetWithoutTTL() throws JunoException, IOException {
AssertJUnit.assertTrue(2 == junoResponse.getVersion());
AssertJUnit.assertEquals(new String(data), new String(junoResponse.getValue()));
AssertJUnit.assertTrue(junoResponse.getTtl() >= (prop.getDefaultLifetime() - 4) && junoResponse.getTtl() <= prop.getDefaultLifetime());
System.out.println("TTL now is:"+junoResponse.getTtl());
//System.out.println("TTL now is:"+junoResponse.getTtl());

LOGGER.info("0");
LOGGER.info("Completed");
Expand Down Expand Up @@ -485,7 +485,7 @@ public void testsetWithZeroLifetime() throws JunoException, Exception{
AssertJUnit.assertEquals(OperationStatus.Success, mResponse1.getStatus());
mResponse1 = junoClient1.get(key);
AssertJUnit.assertEquals(OperationStatus.Success, mResponse1.getStatus());
System.out.println("lifetime for junoClient1 is " + mResponse1.getTtl());
//System.out.println("lifetime for junoClient1 is " + mResponse1.getTtl());
LOGGER.debug("lifetime for junoClient1 is " + mResponse1.getTtl() + ", default is " + prop.getDefaultLifetime());
AssertJUnit.assertEquals(1,mResponse1.getVersion());
AssertJUnit.assertEquals(data.length, mResponse1.getValue().length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setup() throws JunoException, IOException
*/
@Test
public void testCreateWithFieldInjectedClient() {
System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
//System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
String key = UUID.randomUUID().toString();

String data = "data to store in juno on " + new Date(System.currentTimeMillis()).toString();
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testCreateWithFieldInjectedClient() {
*/
@Test
public void testCreateWithConstructorInjectedClient() {
System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
//System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
String key = UUID.randomUUID().toString();

String data = "data to store in juno on " + new Date(System.currentTimeMillis()).toString();
Expand Down Expand Up @@ -125,7 +125,7 @@ public void testCreateWithConstructorInjectedClient() {
*/
@Test
public void testCreateWithCIOAndReadWithFIO() {
System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
//System.out.println( "\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
String key = UUID.randomUUID().toString();

String data = "data to store in juno on " + new Date(System.currentTimeMillis()).toString();
Expand Down

0 comments on commit cab57c9

Please sign in to comment.