Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main merge #103

Merged
merged 4 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/client_ft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
ps -eaf | grep juno
- uses: actions/checkout@v3.5.2
- name: Set up JDK 11
uses: actions/setup-java@v1.4.4
uses: actions/setup-java@v3.11.0
with:
java-version: "11"
distribution: "zulu"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ public void testBatchCreateManyParams() throws JunoException{
}
int i = 0;
for (JunoResponse mResponse: batchResp) {
LOGGER.debug("Key: haha" + i + ": "+ mResponse.getKey());
LOGGER.debug("Key" + i + ": "+ mResponse.getKey());
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 @@ -177,10 +177,10 @@ public void testBatchCreate() throws JunoException{
try {
Iterable<JunoResponse> batchResp = null;
if (syncFlag.reactSync.ordinal() == flag) { //sync react call
LOGGER.debug("come into sync batch create -- vera");
LOGGER.debug("come into sync batch create");
batchResp = junoActClient.doBatch(list).toIterable();
} else { //async react call
LOGGER.debug("come into async batch create -- vera");
LOGGER.debug("come into async batch create");
batchResp = BatchReactSubscriber.async_dobatch(junoActClient, list);
}
int i = 0;
Expand All @@ -206,10 +206,10 @@ public void testBatchCreate() throws JunoException{
try {
LOGGER.debug("before blocking mode batch get " + System.currentTimeMillis());
if (syncFlag.reactSync.ordinal() == flag) { //sync react call
LOGGER.debug("come into sync batch create -- vera");
LOGGER.debug("come into sync batch create");
getBatchResp = junoActClient.doBatch(list1).toIterable();
} else { //async react call
LOGGER.debug("come into async batch get -- vera");
LOGGER.debug("come into async batch get");
getBatchResp = BatchReactSubscriber.async_dobatch(junoActClient, list1);
}
LOGGER.debug("after batch get " + System.currentTimeMillis());
Expand Down Expand Up @@ -800,9 +800,9 @@ public void testBatchCreateTTLmorethan3days() throws JunoException{
ttl[1] = 259201;
hmap.put(new String(key[i]), payload[i]);
hmapTTL.put(new String(key[i]), ttl[i]);
LOGGER.error( "Vera: added ttl haha1" + ttl[i]);
LOGGER.error( " added ttl " + ttl[i]);
JunoRequest item = new JunoRequest(key[i], payload[i], (long)0, ttl[i], JunoRequest.OperationType.Create);
LOGGER.error( "Vera: added ttl haha2" + ttl[i]);
LOGGER.error( " added ttl " + ttl[i]);
list.add(item);
}
LOGGER.debug("\n===Batch Create is sent ");
Expand Down Expand Up @@ -1087,7 +1087,7 @@ public void testBatchCreateManyParams() throws JunoException{
}
int i = 0;
for (JunoResponse mResponse: batchResp) {
LOGGER.debug("Key: haha" + i + ": "+ mResponse.getKey());
LOGGER.debug("Key" + i + ": "+ mResponse.getKey());
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 @@ -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(" 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 @@ -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(" 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(" 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(" mkey is " + new String(response.getKey()));
AssertJUnit.assertEquals (OperationStatus.Success, response.getStatus());
} else {
AssertJUnit.assertEquals (OperationStatus.IllegalArgument, response.getStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public void testGetWithLifetime() throws JunoException, Exception{
AssertJUnit.assertEquals(new String(data), new String(junoResponse.getValue()));

Thread.sleep(3000);
LOGGER.debug("Update key with new timeline vera add" );
LOGGER.debug("Update key with new timeline add" );
JunoResponse junoResponse1;
try {
junoResponse1 = junoClient.get(key, (long)5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void setup() throws JunoException, IOException, InterruptedException {
port = pConfig.getProperty("juno.server.port");
InetAddress address = InetAddress.getByName(ip);
ipAddr = address.getHostAddress();
LOGGER.error( "Vera: juno ip is " + ip + " juno port is " + port + ", ipaddr is " + ipAddr);
LOGGER.error( " juno ip is " + ip + " juno port is " + port + ", ipaddr is " + ipAddr);

try{
junoClient = JunoClientFactory.newJunoClient(new JunoPropertiesProvider(pConfig), SSLUtil.getSSLContext());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public void testGetWithLifetime() throws JunoException, Exception{
AssertJUnit.assertEquals(new String(data), new String(junoResponse.getValue()));

Thread.sleep(3000);
LOGGER.debug("Update key with new timeline vera add" );
LOGGER.debug("Update key with new timeline add" );
JunoResponse junoResponse1;
try {
junoResponse1 = junoReactClient.get(key, (long)5).block();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ public void testSetWithCompression() throws Exception {
/**
* Send a set request with 150K byte payload which will trigger compression, data can be read
* by mayfly java client testGetFromJunoInsert func or junocli, junocli command is:
* ./junocli -s host:port -ssl -c config.toml get -ns "NS1" vera_testSetWithCompressionCrossRead
* ./junocli -s host:port -ssl -c config.toml get -ns "NS1" _testSetWithCompressionCrossRead
* exception
* @throws Exception
*/
Expand All @@ -1027,7 +1027,7 @@ public void testSetWithCompressionCrossMayfly() throws Exception {
LOGGER.info("\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
LOGGER.info("CorrID : ",Integer.toHexString((new Random()).nextInt(0x10000000) + 3846));
byte[] data = DataGenUtils.createCompressablePayload(150000).getBytes();
byte[] key = new String("vera_testSetWithCompressionCrossRead").getBytes();
byte[] key = new String("_testSetWithCompressionCrossRead").getBytes();
long lifetime = 2500;

JunoPropertiesProvider prop = new JunoPropertiesProvider(pConfig2);
Expand All @@ -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 (" 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 @@ -1017,7 +1017,7 @@ public void testSetWithCompression() throws Exception {
/**
* Send a set request with 150K byte payload which will trigger compression, data can be read
* by mayfly java client testGetFromJunoInsert func or junocli, junocli command is:
* ./junocli -s host:port -ssl -c config.toml get -ns "NS1" vera_testSetWithCompressionCrossRead
* ./junocli -s host:port -ssl -c config.toml get -ns "NS1" _testSetWithCompressionCrossRead
* exception
* @throws Exception
*/
Expand All @@ -1026,7 +1026,7 @@ public void testSetWithCompressionCrossMayfly() throws Exception {
LOGGER.info("\n***TEST CASE: " + new Object(){}.getClass().getEnclosingMethod().getName());
LOGGER.info("CorrID : ",Integer.toHexString((new Random()).nextInt(0x10000000) + 3846));
byte[] data = DataGenUtils.createCompressablePayload(150000).getBytes();
byte[] key = new String("vera_testSetWithCompressionCrossRead").getBytes();
byte[] key = new String("_testSetWithCompressionCrossRead").getBytes();
long lifetime = 2500;

JunoPropertiesProvider prop = new JunoPropertiesProvider(pConfig2);
Expand Down