Fix #1084 partial - IT tests failing on Standalone#1164
Fix #1084 partial - IT tests failing on Standalone#1164milleruntime merged 1 commit intoapache:2.0from
Conversation
|
Also pushed up the IteratorEnvIT test change. The Asserts were failing on the standalone because junit is not deployed with accumulo. A RuntimeException was the only exception that did not require a "throws" or change to the implemented interface. |
|
@hkeebler do you think this is ready to go? I will take a look at your changes to the ITs. |
|
yes. |
|
Are the ITs passing now while running standalone? I am in the process of setting up a standalone on my machine to run your changes but found this: https://github.com/apache/fluo-uno/blob/master/conf/accumulo/common/accumulo-it.properties |
|
Yes. I am running with it and have added (per issue description) Also a fix for the "cmd - null entry" errors is to add |
milleruntime
left a comment
There was a problem hiding this comment.
This is looking good so far. I just have a few comments and questions. I also saw this error when I setup an uno instance locally and ran the maven command in my comment.
[INFO] Running org.apache.accumulo.test.functional.AccumuloClientIT [ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 2.312 s <<< FAILURE! - in org.apache.accumulo.test.functional.AccumuloClientIT [ERROR] testClose(org.apache.accumulo.test.functional.AccumuloClientIT) Time elapsed: 0.842 s <<< ERROR! java.lang.IllegalArgumentException: Invalid offset, should be non-negative and less than 0 at org.apache.accumulo.test.functional.AccumuloClientIT.deleteUsers(AccumuloClientIT.java:56)
I plan on running the rest of your changes tomorrow.
test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
Outdated
Show resolved
Hide resolved
| getClusterControl().stopAllServers(ServerType.TABLET_SERVER); | ||
| getClusterControl().startAllServers(ServerType.TABLET_SERVER); | ||
| } | ||
| } |
There was a problem hiding this comment.
Could you just put this in configureMiniCluster()? Or does it have to be before configureMiniCluster is called?
There was a problem hiding this comment.
This is an interesting solution for the standalone case. However, if it is necessary to alter the configuration of the system for the test, then it is probably not suitable for a standalone test, and should be recategorized so as to be skipped when running against a standalone instance.
There was a problem hiding this comment.
@milleruntime configureMiniCluster() is called when a MAC is used. In this case we are running standalone so it would not be called.
test/src/main/java/org/apache/accumulo/test/functional/ManyWriteAheadLogsIT.java
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/functional/AccumuloClientIT.java
Show resolved
Hide resolved
| ClusterUser testuser1 = getUser(0); | ||
| final String user1 = testuser1.getPrincipal(); | ||
| final String password1 = testuser1.getPassword(); | ||
| c.securityOperations().createLocalUser(user1, new PasswordToken(password1)); |
There was a problem hiding this comment.
The purpose of the ClusterUser abstraction is to allow test to work with passwords or kerberose. For this test to work with kerberose it should not use PasswordToken(), but instead use testuser1.getToken()
There was a problem hiding this comment.
Thanks. I'll assume a kerberose check is needed.
There was a problem hiding this comment.
Hopefully testuser1.getToken() is an easy change and it works with password or kerberose. If not this could be a follow on issue.
There was a problem hiding this comment.
Nevermind, this is not as simple as I thought. I was thinking c.securityOperations().createLocalUser(user1, testuser1.getToken()). However I looked at the method createLocalUser and it explicitly takes a PasswordToken. I saw some other test code passes null for the token when sasl is enabled, but I Am not sure what the correct thing to do.
|
|
||
| public class AccumuloClientIT extends AccumuloClusterHarness { | ||
|
|
||
| @Before |
There was a problem hiding this comment.
It seems like it would be better to make this method an @After method.
There was a problem hiding this comment.
I agree. I finally saw the error, the second time I ran the test:
org.apache.accumulo.core.client.AccumuloSecurityException: Error USER_EXISTS for user testuser - The user exists
But it would make more sense to put it as an @After method.
There was a problem hiding this comment.
agree. I'll test it out. BUT what if we updated the harness to create users prefixed with the methodname (like the tables) - then the deleteusers in the harness would work. Is there a limit to the number of characters a username can have?
There was a problem hiding this comment.
what if we updated the harness to create users prefixed with the methodname (like the tables)
That may make sense to do. That feels like a follow on issue, what do you think?
The class name as a prefix is confusing because with inheritance and multiple classes its hard to know if you got it right. Maybe just use a constant like
public static final String HARNESS_USER_PREFIX="a1b1ae6bfef2ca11d92b86ab60930b3c56971f6e"Then all code can just use that constant. I picked the latest commit hash on the master branch for the value. The constant could also be a classname, it does not really matter what it is as long its somewhat unique.
There was a problem hiding this comment.
So I see this request is accepted. Do you still want me to move the deleteuser to the @after? Or did someone do that already?
There was a problem hiding this comment.
I think it would be good to make it after
|
I'll create a ticket to update the user creation , deletion in the harness. thanks. |
|
OK I will merge this PR as I think its ready to go. @hkeebler What would you like the GitHub comment to say? |
It would be nice to make the |
|
You don't like the one that is there? Fix #1084 Fixes many of the IT tests failing on standalone cluster |
|
I'll make those changes now and repush so wait |
This is what shows up on the command line: |
AccumuloClientIT, ManyWariteaheadLogsIT, ReadWriteIT, YieldScannersIT, BadDeleteMarkers...IT and others that failed due to null in the command prefix Also includes IteratorEnvIT fix
|
@keith-turner I made the @after change and comment cleanup change. I did not make the getToken() for kerberose change. The test has alot going on and I am unfamiliar with what else would need to be updated for sasl or kerberose. If desired we can take this test out of this set of updates. |
@hkeebler just making the |
|
@hkeebler is this PR finished? |
|
yes, you approved it a while back |
|
sorry, use the hkeebler:accumulo-1084 commit. I mistakenly created a pull request instead of recommitting initially. |
|
@milleruntime I did not intend to close this. Did I do that or did you do that? |
I am confused...you closed this PR. Did you still want me to merge it? |
|
I'm confused. Yes I wanted it to be merged. Oh I see, Imust have clicked the button on the left. |
Yes, probably. OK I am merging this now. |
AccumuloClientIT, - fixed in AccumuloClusterHarness (avoid setting Servercontext) Will likely still fail if running SASL. The tests were not cleaning up the users so used more the scheme already in the harness but that could really be cleaned up even more for all tests and probably a separate ticket.
ManyWariteaheadLogsIT - Needed to alter standalone config.
ReadWriteIT, - reduced what was necessary to identify an SSL monitor and removed dependency on reading the props file.
YieldScannersIT, - adding a cleanup to the YieldingIterator
BadDeleteMarkers...IT and others that failed due to null in the command prefix - One solution is to always have an entry in the accumulo.it.properties file for server and client prefix but additionally added the cleanup in AccumuloClusterHarness to ensure a null is not passed.
For tests timing out I added a comment to the Testing.md to up the timeout.