Merge branch 'jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
495a1cb109
|
@ -91,7 +91,7 @@ public class AbstractRestServlet extends HttpServlet
|
|||
{
|
||||
try
|
||||
{
|
||||
return ("http://open.api.ebay.com/shopping?MaxEntries=3&appid=" + _appid +
|
||||
return ("https://open.api.ebay.com/shopping?MaxEntries=3&appid=" + _appid +
|
||||
"&version=573&siteid=0&callname=FindItems&responseencoding=JSON&QueryKeywords=" +
|
||||
URLEncoder.encode(item, "UTF-8"));
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -44,7 +44,7 @@
|
|||
<jetty.surefire.argLine>-Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -showversion -Xmx2g -Xms2g -Xlog:gc:stderr:time,level,tags</jetty.surefire.argLine>
|
||||
|
||||
<!-- some maven plugins versions -->
|
||||
<maven.surefire.version>3.0.0-M4</maven.surefire.version>
|
||||
<maven.surefire.version>3.0.0-M5</maven.surefire.version>
|
||||
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
|
||||
<maven.dependency.plugin.version>3.1.1</maven.dependency.plugin.version>
|
||||
<maven.resources.plugin.version>3.1.0</maven.resources.plugin.version>
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.containers.output.Slf4jLogConsumer;
|
||||
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
@ -54,14 +55,16 @@ public class MongoTestHelper
|
|||
|
||||
static GenericContainer mongo =
|
||||
new GenericContainer("mongo:" + System.getProperty("mongo.docker.version", "2.2.7"))
|
||||
.withLogConsumer(new Slf4jLogConsumer(MONGO_LOG));
|
||||
.withLogConsumer(new Slf4jLogConsumer(MONGO_LOG))
|
||||
.waitingFor(new LogMessageWaitStrategy()
|
||||
.withRegEx(".*waiting for connections.*"));
|
||||
|
||||
static MongoClient mongoClient;
|
||||
|
||||
static String mongoHost;
|
||||
static int mongoPort;
|
||||
|
||||
public static void startMongo()
|
||||
static
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -71,6 +74,7 @@ public class MongoTestHelper
|
|||
mongoPort = mongo.getMappedPort(27017);
|
||||
LOG.info("Mongo container started for {}:{} - {}ms", mongoHost, mongoPort,
|
||||
System.currentTimeMillis() - start);
|
||||
mongoClient = new MongoClient(mongoHost, mongoPort);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -79,24 +83,8 @@ public class MongoTestHelper
|
|||
}
|
||||
}
|
||||
|
||||
public static void stopMongo()
|
||||
{
|
||||
mongo.stop();
|
||||
mongoClient = null;
|
||||
}
|
||||
|
||||
public static MongoClient getMongoClient() throws UnknownHostException
|
||||
{
|
||||
boolean restart = false;
|
||||
if (mongo == null || !mongo.isRunning())
|
||||
{
|
||||
startMongo();
|
||||
restart = true;
|
||||
}
|
||||
if (mongoClient == null || restart)
|
||||
{
|
||||
mongoClient = new MongoClient(mongoHost, mongoPort);
|
||||
}
|
||||
return mongoClient;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue