You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2021/01/09 10:59:22 UTC

[GitHub] [jmeter] ham1 commented on a change in pull request #638: Bolt Sampler - Neo4j 4.x and cluster features

ham1 commented on a change in pull request #638:
URL: https://github.com/apache/jmeter/pull/638#discussion_r554373945



##########
File path: src/protocol/bolt/src/main/java/org/apache/jmeter/protocol/bolt/sampler/AbstractBoltTestElement.java
##########
@@ -17,13 +17,53 @@
 
 package org.apache.jmeter.protocol.bolt.sampler;
 
+import java.time.Duration;
+
+import org.apache.commons.lang3.EnumUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.testelement.AbstractTestElement;
+import org.neo4j.driver.AccessMode;
+import org.neo4j.driver.SessionConfig;
+import org.neo4j.driver.TransactionConfig;
 
 public abstract class AbstractBoltTestElement extends AbstractTestElement {
 
     private String cypher;
     private String params;
+    private String database;
+    private String accessMode;
     private boolean recordQueryResults;
+    private int txTimeout;
+
+    public int getTxTimeout() {
+        return txTimeout;
+    }
+
+    public void setTxTimeout(int txTimeout) {
+        this.txTimeout = txTimeout;
+    }
+
+    public String getAccessMode() {
+        if (accessMode != null) {

Review comment:
       Consider writing this using a guard clause? i.e.
   ```
   if (accessMode == null) {
       return AccessMode.WRITE.toString();
   }
   return accessMode;
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org