GithubHelp home page GithubHelp logo

testing-mysql-server's Introduction

Airlift

Maven Central Build Status

Airlift is a framework for building REST services in Java.

This project is used as the foundation for distributed systems like Trino (formerly PrestoSQL).

Airlift pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done and includes built-in support for configuration, metrics, logging, dependency injection, and much more, enabling you and your team to ship a production-quality web service in the shortest time possible.

Airlift takes the best-of-breed libraries from the Java ecosystem and glues them together based on years of experience in building high performance Java services without getting in your way and without forcing you into a large, proprietary framework.

Getting Started

Reference

Recipes

testing-mysql-server's People

Contributors

caithagoras0 avatar electrum avatar tdcmeehan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

testing-mysql-server's Issues

mysql deamon fails to start

Tests for packages fail as mysql deamon fails to start.
On ppce RHEL architecture, on building the package a tmp folder is formed under /tmp. the daemon fails to start with the command below, run as part of testcases

[/tmp/testing-mysql-server6374051306685796804/bin/mysqld][--no-defaults][--basedir=/tmp/testing-mysql-server6374051306685796804][--socket=mysql.sock][--port=59281][--datadir=/tmp/testing-mysql-server6374051306685796804/data][--pid-file=/tmp/testing-mysql-server6374051306685796804/data/MysqldResource.pid]
[MysqldResource] launching mysqld (testing-mysql-server)
2016-05-26 10:18:30 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-26 10:18:30 0 [Note] /tmp/testing-mysql-server6374051306685796804/bin/mysqld (mysqld 5.6.30) starting as process 13567 ...
2016-05-26 10:18:30 13567 [ERROR] Can't read from messagefile '/tmp/testing-mysql-server6374051306685796804/share/english/errmsg.sys'
2016-05-26 10:18:30 13567 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2016-05-26 10:18:30 13567 [ERROR] Aborting

2016-05-26 10:18:30 13567 [Note] Binlog end
2016-05-26 10:18:30 13567 [Note]

I am able to start the server with the following command
/tmp/testing-mysql-server6374051306685796804/bin/mysql start

can anyone help on if any setting is being missed which fails to start the server as per the script

testcase getting failed with resource not found error

Hi,

below are the full logs for test case failure, could you please help me out to fix these error.

~/testing-mysql-server# mvn clean install

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testing-mysql-server 0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ testing-mysql-server ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (default) @ testing-mysql-server ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ testing-mysql-server ---
[INFO]
[INFO] --- maven-dependency-versions-check-plugin:2.0.2:check (default) @ testing-mysql-server ---
[INFO] Checking dependency versions
[INFO]
[INFO] --- license-maven-plugin:2.3:check (default) @ testing-mysql-server ---
[INFO] Checking licenses...
[INFO]
[INFO] --- jacoco-maven-plugin:0.6.2.201302030002:prepare-agent (default) @ testing-mysql-server ---
[INFO] argLine set to -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/0.6.2.201302030002/org.jacoco.agent-0.6.2.201302030002-runtime.jar=destfile=/root/testing-mysql-server/target/jacoco.exec
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ testing-mysql-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/testing-mysql-server/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ testing-mysql-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /root/testing-mysql-server/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ testing-mysql-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/testing-mysql-server/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ testing-mysql-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /root/testing-mysql-server/target/test-classes
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (default) @ testing-mysql-server ---
[INFO] No dependency problems found
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-duplicate (default) @ testing-mysql-server ---
[INFO] No duplicate dependencies found in or in
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-dep-mgt (default) @ testing-mysql-server ---
[INFO] Found Resolved Dependency / DependencyManagement mismatches:
[INFO] Ignoring Direct Dependencies.
[INFO] None
[INFO]
[INFO] --- maven-duplicate-finder-plugin:1.0.6:check (default) @ testing-mysql-server ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[INFO]
[INFO] --- maven-surefire-plugin:2.14:test (default-test) @ testing-mysql-server ---
[INFO] Surefire report directory: /root/testing-mysql-server/target/surefire-reports


T E S T S

Running io.airlift.testing.mysql.TestTestingMySqlServer
Configuring TestNG with: TestNG652Configurator
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.797 sec <<< FAILURE!
testDatabase(io.airlift.testing.mysql.TestTestingMySqlServer) Time elapsed: 0.43 sec <<< FAILURE!
java.util.MissingResourceException: Resource '5-5-9/Linux-ppc64le/mysqld' not found
at com.mysql.management.util.Streams.getResourceAsStream(Streams.java:124)
at com.mysql.management.util.Streams.getResourceAsStream(Streams.java:108)
at com.mysql.management.util.Streams$1.inner(Streams.java:140)
at com.mysql.management.util.Exceptions$VoidBlock.exec(Exceptions.java:129)
at com.mysql.management.util.Streams.createFileFromResource(Streams.java:153)
at com.mysql.management.MysqldResource.extractExecutable(MysqldResource.java:544)
at com.mysql.management.MysqldResource.makeMysqld(MysqldResource.java:532)
at com.mysql.management.MysqldResource.deployFiles(MysqldResource.java:515)
at com.mysql.management.MysqldResource.exec(MysqldResource.java:492)
at com.mysql.management.MysqldResource.start(MysqldResource.java:213)
at com.mysql.management.MysqldResource.start(MysqldResource.java:168)
at io.airlift.testing.mysql.TestingMySqlServer.(TestingMySqlServer.java:78)
at io.airlift.testing.mysql.TestingMySqlServer.(TestingMySqlServer.java:56)
at io.airlift.testing.mysql.TestTestingMySqlServer.testDatabase(TestTestingMySqlServer.java:35)

Results :

Failed tests:
TestTestingMySqlServer.testDatabase:35 » MissingResource Resource '5-5-9/Linux...

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.434 s
[INFO] Finished at: 2015-12-17T19:12:50+05:30
[INFO] Final Memory: 17M/41M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.14:test (default-test) on project testing-mysql-server: There are test failures.
[ERROR]
[ERROR] Please refer to /root/testing-mysql-server/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Need ppc64le support for testing-mysql-server

Further to port presto-mysql to ppc64le VM, package fails as the internally used testing-mysql-server does not have support for ppc64le. (Please refer to earlier issue: prestodb/presto#6152)

As part of providing the support. Edited the mysql-connector-mxj-db-files-5.0.12.jar created when the package builds.
Changes done were to create a 'Linuz-ppc64le' folder in the jar and copy the ppc64le compatible mysql and mysqld file into it.

As mentioned on the issue, would need testing-mysql-server to support ppc64le.

NullPointerException on shutdown

java.lang.RuntimeException: java.lang.NullPointerException
    at com.mysql.management.MysqldResource.destroyShell(MysqldResource.java:359)
    at com.mysql.management.MysqldResource.shutdown(MysqldResource.java:323)
    at io.airlift.testing.mysql.TestingMySqlServer.close(TestingMySqlServer.java:136)
    at io.airlift.testing.Closeables.closeAllRuntimeException(Closeables.java:76)
    at com.facebook.presto.raptor.TestRaptorIntegrationSmokeTestMySql.destroy(TestRaptorIntegrationSmokeTestMySql.java:54)

Windows Support: Wrong OS Name and Missing Executable

This does not work on Windows because the underlying mysql package looks for the mysql libraries at: Win-x86. Unfortunately, the name of the os will be something like Windows_8. This can be fixed by adding a platform-map.properties resource with mappings like: Windows_8-amd64=Win-x86

Linking error in 8.0.12-1

Version 8.0.12-1 has an implicit dependency on libssl.so.1.0.0 and libcrypto.so.1.0.0 being present in the user's environment.

While the packaging script adds these, it only adds them to the lib folder. The standard MySQL distribution has these files present in both the bin and lib folders. It appears that due to the way the binary is linked, it's not sufficient for these to be present in just the lib folder.

This can be verified by running the following in a Linux distribution.

jar xf testing-mysql-server-8.0.12-1.jar
tar xvzf mysql-Linux-amd64.tar.gz
cd bin
ldd mysqld

Output:

[tdm@mymachine ~/mydir] ldd mysqld
	<<SNIP>>
	libssl.so.1.0.0 => not found
	libcrypto.so.1.0.0 => not found
	<<SNIP>>

If you compare this with the standard distribution of mysql, they get picked up because it picks up the local .so files in bin:

[tdm@mymachine ~/deleteme/mysql-8.0.15-linux-glibc2.12-x86_64/bin] ldd mysqld
	<<SNIP>>
	libssl.so.1.0.0 => /home/tdm/deleteme/mysql-8.0.15-linux-glibc2.12-x86_64/bin/./libssl.so.1.0.0 (0x00007fd1e1652000)
	libcrypto.so.1.0.0 => /home/tdm/deleteme/mysql-8.0.15-linux-glibc2.12-x86_64/bin/./libcrypto.so.1.0.0 (0x00007fd1e1218000)
	<<SNIP>>

Without the .so files the server fails to start:

/tmp/testing-mysql-server6111734346362237715/bin/mysqld: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

        at io.airlift.testing.mysql.EmbeddedMySql.system(EmbeddedMySql.java:280)
        at io.airlift.testing.mysql.EmbeddedMySql.initialize(EmbeddedMySql.java:158)
        at io.airlift.testing.mysql.EmbeddedMySql.<init>(EmbeddedMySql.java:80)
        at io.airlift.testing.mysql.TestingMySqlServer.<init>(TestingMySqlServer.java:54)
        at io.airlift.testing.mysql.TestingMySqlServer.<init>(TestingMySqlServer.java:44)

Failure on building testing-mysql-server

Tried to clone and build testing-mysql-server.

Steps followed:
git clone https://github.com/airlift/testing-mysql-server
mvn clean install -DskipTests

Build failed with the following error
[DEBUG] Findbugs arg is /testing-mysql-server/target/classes
[java] The following errors occurred during analysis:
[java] Nov 14, 2016 12:25:36 PM edu.umd.cs.findbugs.TextUIBugReporter reportAnalysisError
[java] SEVERE: Unable to get XClass for java/lang/StringBuilder
[java] java.lang.ArrayIndexOutOfBoundsException: 20993
[java] at org.objectweb.asm.ClassReader.readClass(Unknown Source)
[java] at org.objectweb.asm.ClassReader.accept(Unknown Source)
[java] at edu.umd.cs.findbugs.asm.FBClassReader.accept(FBClassReader.java:44)
[java] at org.objectweb.asm.ClassReader.accept(Unknown Source)
[java] at edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:110)
[java] at edu.umd.cs.findbugs.classfile.engine.ClassParserUsingASM.parse(ClassParserUsingASM.java:554)
[java] at edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:76)
[java] at edu.umd.cs.findbugs.classfile.engine.ClassInfoAnalysisEngine.analyze(ClassInfoAnalysisEngine.java:38)
[java] at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(AnalysisCache.java:266)
[java] at edu.umd.cs.findbugs.ba.XFactory.getXClass(XFactory.java:652)
[java] at edu.umd.cs.findbugs.ba.ch.Subtypes2.addInheritanceEdge(Subtypes2.java:1227)
[java] at edu.umd.cs.findbugs.ba.ch.Subtypes2.addSupertypeEdges(Subtypes2.java:1200)
[java] at edu.umd.cs.findbugs.ba.ch.Subtypes2.addClassAndGetClassVertex(Subtypes2.java:275)
[java] at edu.umd.cs.findbugs.ba.ch.Subtypes2.addClass(Subtypes2.java:244)
[java] at edu.umd.cs.findbugs.ba.AnalysisCacheToAnalysisContextAdapter.setAppClassList(AnalysisCacheToAnalysisContextAdapter.java:400)
[java] at edu.umd.cs.findbugs.FindBugs2.setAppClassList(FindBugs2.java:982)
[java] at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:225)
[java] at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:391)
[java] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1300)
[java] Unable to get XClass for java/lang/StringBuilder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.