Tests configuration improvements.
diff --git a/nlpcraft/pom.xml b/nlpcraft/pom.xml
index 67a57bb..77f64e1 100644
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@ -321,6 +321,12 @@
<configuration>
<!-- Skips all tests on phase `test`. -->
<skip>true</skip>
+ <systemProperties>
+ <property>
+ <name>NLPCRAFT_TEST_MAVEN_ENV</name>
+ <value>true</value>
+ </property>
+ </systemProperties>
</configuration>
<executions>
<!-- All tests are defined as integration. -->
@@ -336,6 +342,10 @@
<includes>
<include>**/*.*</include>
</includes>
+ <excludes>
+ <exclude>**/NCConversationSpec.*</exclude>
+ <exclude>**/NCDateGeneratorSpec.*</exclude>
+ </excludes>
</configuration>
</execution>
</executions>
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
index 2e57177..713eae6 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
@@ -26,12 +26,17 @@
class NCTestExampleModelsSpec {
@Test
def test(): Unit = {
- val models = "" +
+ var models = "" +
"org.apache.nlpcraft.examples.alarm.AlarmModel," +
"org.apache.nlpcraft.examples.time.TimeModel," +
"org.apache.nlpcraft.examples.lightswitch.LightSwitchModel," +
"org.apache.nlpcraft.examples.echo.EchoModel"
+ val maven = System.getProperty("NLPCRAFT_TEST_MAVEN_ENV")
+
+ if (maven == null || maven.toLowerCase != "true")
+ models = s"$models,org.apache.nlpcraft.examples.weather.WeatherModel"
+
// Instruct auto-validator what models to test.
System.setProperty("NLPCRAFT_TEST_MODELS", models)
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
index 4db3503..7c817e3 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
@@ -26,18 +26,17 @@
import org.apache.nlpcraft.server.nlp.enrichers.date.tools.NCDateGenerator.LHM_SS
import org.apache.nlpcraft.server.nlp.enrichers.date.{NCDateParser, NCDateRange}
import org.junit.jupiter.api.Assertions.{assertTrue, fail}
-import org.junit.jupiter.api.{Disabled, Test}
+import org.junit.jupiter.api.Test
import scala.collection.JavaConverters._
import scala.collection._
-import scala.collection.mutable.{LinkedHashMap ⇒ LHM}
+import scala.collection.mutable.{LinkedHashMap => LHM}
import scala.language.implicitConversions
/**
* Tests for dates templates generators.
* Excluded from suite because added for manual testing.
*/
-@Disabled
class NCDateGeneratorSpec {
private def print(
f: LHM[String, String] ⇒ Unit, cnt: Int = 500, asc: Boolean = true, keys2Check: Option[Seq[String]] = None