-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixes #180 - Migrate 'PerformanceTest' to be a real integration test #196
Conversation
- Adds two different site-specific Maven profiles: `mysql-ukp` and `mysql-hhn` - Adds Maven configuration for IT-setup (via maven-failsafe-plugin) - Introduces the new src branch `src/it/java` in wikipedia.api module - Moves and refactors existing code of `PerformanceTest` and `PerformanceTestPageIterator` to be executable in an IT environment - Introduces `PerformanceIT` as a true integration test - Adds MySQL/C3P0 dependencies in test scope to be capable of running against MySQL as if in a production setup
@reckart Please review this and check the Maven profile FYI: |
It seems Jenkins output:
EDIT: |
- Corrects integration-test profile setup. By default ITs are switched off now, as regular devs need a build that is passing - A working mvn commandline (locally or on CI servers) should now add `-Pjacoco -Pintegration-test -Pmysql-ukp`
as they might not have access to one of the two institution specific | ||
MySQL resource profiles. | ||
--> | ||
<skip.integration.tests>true</skip.integration.tests> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you could just set the skipITs
property directly. Cf. https://maven.apache.org/surefire/maven-failsafe-plugin/integration-test-mojo.html#skipITs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
<scope>test</scope> | ||
<scope>runtime</scope> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtime
dependencies are transitive. Logging backend dependencies should not be included as transitive dependencies by libraries. Cf. https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed with b8ce4b4
int pageCycles = Integer.parseInt(configuration.getProperty("performance.cycles.page")); | ||
pt = new PerformanceTest(wiki, maxiCycles, pageCycles); | ||
} catch (Exception e) { | ||
fail("Wikipedia could not be initialized: "+e.getLocalizedMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just throw the exception. This "eats" the stack trace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed with b8ce4b4
@mawiesne Eventually, the UKP-internal DB server will go away. So I think it probably doesn't make too much sense to test against it. If I were to test against it, then IMHO it would be sensible to test against it in addition to testing against HSQL and not testing only against the MySQL server. But I believe currently I could not activate both profiles, right? |
@reckart You can use both profiles the same time, try The output should look like this (output here at HHN system environment):
|
I have added the profiles |
@reckart see my TODO in pom.xml of wikipedia.api module:
If the values are fine, then remove this line from the pom.xml or modify it and push it. Once correctly setup, we have two institutions that can verify performance aspects or if mysql setup is working. Here in HHN, the mysql setup will not vanish too soon, i.e. at least one institution can conduct this kind of verification. Any way, both profiles ( |
@reckart It seems we need other credentials or the DBA setting some permissions.
|
@mawiesne the hostname is wrong. It should be "bender.ukp.informatik.tu-darmstadt.de". |
@reckart Look at the value in the |
@reckart I understood the problem: Roberto is Jenkins and if the IT code is run from there it connects from there. So you have to GRANT access for that user at this machine. That‘s what the error message is telling us: |
The problem is probable the username/password used. Could it be that you mixed up the credentials for |
I merely took the credentials from the existing code. See original |
@mawiesne Then I guess the test wouldn't have run because the user |
The test seemed to be broke before then. So @reckart, please change the values to student/student then, so a build is triggered. Background: I can’t do this atm, as I‘m on vacation and without an IDE for the next 2 weeks. |
- Changed credentials for UKP database server used during test
@mawiesne ok, I made the change via the web interface of GitHub :) Let's see how the build goes. |
Worked, nice. (: |
@mawiesne Merged 👍 |
mysql-ukp
andmysql-hhn
src/it/java
in wikipedia.api modulePerformanceTest
andPerformanceTestPageIterator
to be executable in an IT environmentPerformanceIT
as a true integration test