Skip to content

Instantly share code, notes, and snippets.

View vmassol's full-sized avatar

Vincent Massol vmassol

View GitHub Profile
@vmassol
vmassol / gist:98d2e8672051fb90fa20628f247c48a9
Created March 27, 2020 12:10
OfficeImporterIT on Oracle
This file has been truncated, but you can view the full file.
Setup:
@UITest(office = true, servletEngine = ServletEngine.TOMCAT, database = Database.ORACLE, databaseTag = "19.3.0-se2",
verbose=true, debug=true,
forbiddenEngines = {
// These tests need to have XWiki running inside a Docker container (we chose Tomcat since it's the most
// used one), because they need LibreOffice to be installed, and we cannot guarantee that it is installed on the
// host machine.
ServletEngine.JETTY_STANDALONE
},
org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:322)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:302)
at org.testcontainers.containers.PortForwardingContainer.createSSHSession(PortForwardingContainer.java:41)
at org.testcontainers.containers.PortForwardingContainer.getSshConnection(PortForwardingContainer.java:26)
at org.testcontainers.containers.PortForwardingContainer.exposeHostPort(PortForwardingContainer.java:67)
at org.testcontainers.containers.PortForwardingContainer.exposeHostPort(PortForwardingContainer.java:61)
at org.testcontainers.Testcontainers.exposeHostPorts(Testcontainers.java:15)
at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeAll(XWikiDockerExtension.java:126)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$7(ClassBasedTestDescriptor.java:359)
...
04:20:29.482 [main] INFO o.x.t.d.i.j.XWikiDockerExtension - (*) Starting database [POSTGRESQL]...
04:20:29.508 [main] DEBUG o.t.images.AbstractImagePullPolicy - Using locally available and not pulling image: postgres:12
04:20:29.508 [main] INFO o.x.t.d.i.j.AbstractContainerExecutor - Docker image used: [postgres:12]
04:20:29.512 [main] INFO o.x.t.d.i.junit5.DockerTestUtils - Pulling image [postgres:12]
04:20:29.516 [main] DEBUG o.t.utility.RegistryAuthLocator - Looking up auth config for image: postgres:12
04:20:29.516 [main] DEBUG o.t.utility.RegistryAuthLocator - RegistryAuthLocator has configFile: /root/.docker/config.json (does not exist) and commandPathPrefix:
04:20:29.516 [main] WARN o.t.utility.RegistryAuthLocator - Failure when attempting to lookup auth config (dockerImageName: postgres:12, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
04:20:29.516 [main] DEBUG o.t.d.a.AuthDelegat
14:35:06.850 [tc-okhttp-stream-1264384309] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDERR: 02-Jan-2020 13:35:06.856 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 19105 ms
14:35:08.794 [tc-okhttp-stream-1264384309] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:35:08,800 [XWiki initialization] DEBUG c.x.x.s.DBCPConnectionProvider - Configure DBCPConnectionProvider
14:35:08.847 [tc-okhttp-stream-1264384309] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:35:08,846 [XWiki initialization] DEBUG c.x.x.s.DBCPConnectionProvider - Creating a DBCP BasicDataSource with the following DBCP factory properties:
14:35:08.847 [tc-okhttp-stream-1264384309] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:35:08,851 [XWiki initialization] DEBUG c.x.x.s.DBCPConnectionProvider - -- listing properties --
14:35:08.847 [tc-okhttp-stream-1264384309] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: url=jdbc:oracle:thin:@tc-V86zgqrG
14:06:40.554 [tc-okhttp-stream-1359603919] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDERR: 02-Jan-2020 13:06:40.564 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 18400 ms
14:06:47.270 [tc-okhttp-stream-1359603919] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:06:47,282 [XWiki initialization] DEBUG o.h.SQL - create global temporary table HT_xwikilargestrings (XWL_ID number(19,0) not null, XWL_NAME varchar2(255 char) not null) on commit delete rows
14:06:47.358 [tc-okhttp-stream-1359603919] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:06:47,375 [XWiki initialization] DEBUG o.h.SQL - create global temporary table HT_xwikilongs (XWL_ID number(19,0) not null, XWL_NAME varchar2(255 char) not null) on commit delete rows
14:06:47.368 [tc-okhttp-stream-1359603919] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 13:06:47,386 [XWiki initialization] DEBUG o.h.SQL
13:46:35.221 [tc-okhttp-stream-1898124854] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDERR: 02-Jan-2020 12:46:35.221 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 21796 ms
13:46:43.582 [tc-okhttp-stream-1898124854] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 12:46:43,592 [XWiki initialization] DEBUG o.h.SQL - create global temporary table HT_xwikilargestrings (XWL_ID number(19,0) not null, XWL_NAME varchar2(255 char) not null) on commit delete rows
13:46:43.661 [tc-okhttp-stream-1898124854] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 12:46:43,671 [XWiki initialization] DEBUG o.h.SQL - create global temporary table HT_xwikilongs (XWL_ID number(19,0) not null, XWL_NAME varchar2(255 char) not null) on commit delete rows
13:46:43.670 [tc-okhttp-stream-1898124854] INFO o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 2020-01-02 12:46:43,681 [XWiki initialization] DEBUG o.h.SQL
[INFO] --- maven-failsafe-plugin:3.0.0-M4:integration-test (functional-tests) @ xwiki-platform-menu-test-docker ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Listening for transport dt_socket at address: 5005
[INFO] Running org.xwiki.menu.test.ui.MenuIT
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
✔ Docker environment should have more than 2GB free disk space
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (check-dependency-version) @ latex-filter ---
[INFO] Skipping Rule Enforcement.
[INFO]
[INFO] --- spoon-maven-plugin:3.0:check (default) @ latex-filter ---
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (xwiki-license-resources) @ latex-filter ---
[INFO]
[INFO] --- maven-antrun-plugin:1.8:run (default) @ latex-filter ---
[INFO] Executing tasks
@vmassol
vmassol / XMLUtils_ESTest.java
Created October 7, 2019 07:19
Generated by Botsing/Evosuite with model seeding
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
2019-10-02 14:53:47.463:INFO:oxtjl.NotifyListener:main: ----------------------------------
2019-10-02 14:53:47.465:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://vmassol:8080/ in your browser to access your wiki.
2019-10-02 14:53:47.465:INFO:oxtjl.NotifyListener:main: ----------------------------------
2019-10-02 14:54:01,116 [XWiki initialization] INFO .HibernateDataMigrationManager - Storage schema updates and data migrations are enabled
2019-10-02 14:54:01,493 [XWiki initialization] INFO .HibernateDataMigrationManager - No data migration to apply for wiki [xwiki] currently in version [1138000]
2019-10-02 14:54:01,494 [XWiki initialization] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xwiki]
2019-10-02 14:54:05,403 [XWiki initialization] INFO ationFilterPreferencesMigrator - Wiki [xwiki] has already been migrated.
2019-10-02 14:54:05,414 [org.xwiki.search.solr.internal.job.IndexerJob@2a678fc6([solr, indexer])] INFO