The if (getAuthType() == AUTHTYPE_SAS) line seems to be causing some unintended behavior where, == compares memory address of the two values (which since AUTHTYPE_SAS is static, it's not the same address). Versus, changing the if statement to getAuthType().equals(AUTHTYPE_SAS), will compare the value of the variables (https://www.geeksforgeeks.org/difference-equals-method-java/).
Actual:
Unable to execute in jmeter cli context with Shared access signature selected with proper parameters
Expected:
Able to execute in jmeter cli context with Shared access signature selected with proper parameters
Unable to execute in jmeter cli context with Shared access signature selected. Error generated from below:
https://github.com/pnopjp/jmeter-plugins/blob/64ed25ecce831a510dc79e9604089b18f3e6c0a5/plugins/protocol/aad/src/main/java/jp/co/pnop/jmeter/protocol/aad/config/AzAdCredential.java#L234-L250
due to the following:
https://github.com/pnopjp/jmeter-plugins/blob/64ed25ecce831a510dc79e9604089b18f3e6c0a5/plugins/protocol/eventhubs/src/main/java/jp/co/pnop/jmeter/protocol/azureeventhubs/sampler/AzEventHubsSampler.java#L201-L214
The
if (getAuthType() == AUTHTYPE_SAS)
line seems to be causing some unintended behavior where,==
compares memory address of the two values (which sinceAUTHTYPE_SAS
isstatic
, it's not the same address). Versus, changing the if statement togetAuthType().equals(AUTHTYPE_SAS)
, will compare the value of the variables (https://www.geeksforgeeks.org/difference-equals-method-java/).Actual: Unable to execute in jmeter cli context with Shared access signature selected with proper parameters
Expected: Able to execute in jmeter cli context with Shared access signature selected with proper parameters