aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-02 20:15:05 +0300
committerGravatar Vitaly Takmazov2018-04-02 20:15:05 +0300
commit2deb31599d662cd5ff024ec0bb2cb11d43698337 (patch)
tree2cf4784a67ae0628db4e534f871436ad80fa9372
parent2e5ba5e7462d6684433ea638c9ff8f95c864be74 (diff)
www: temporarily disable xmpp integration
-rw-r--r--juick-www/build.gradle1
-rw-r--r--juick-www/src/main/java/com/juick/Application.java7
-rw-r--r--juick-www/src/test/java/com/juick/WebAppTests.java15
3 files changed, 3 insertions, 20 deletions
diff --git a/juick-www/build.gradle b/juick-www/build.gradle
index cf7da5bd..10a00b36 100644
--- a/juick-www/build.gradle
+++ b/juick-www/build.gradle
@@ -23,7 +23,6 @@ apply plugin: 'org.springframework.boot'
dependencies {
compile project(':juick-server-jdbc')
- providedCompile project(':juick-server-xmpp')
compile 'com.github.ben-manes.caffeine:caffeine:2.6.2'
compile("org.springframework.boot:spring-boot-starter-cache")
compile ('org.springframework.boot:spring-boot-starter-security')
diff --git a/juick-www/src/main/java/com/juick/Application.java b/juick-www/src/main/java/com/juick/Application.java
index 586c3e59..cb132ae9 100644
--- a/juick-www/src/main/java/com/juick/Application.java
+++ b/juick-www/src/main/java/com/juick/Application.java
@@ -1,9 +1,5 @@
package com.juick;
-import com.juick.server.CommandsManager;
-import com.juick.server.XMPPConnection;
-import com.juick.server.XMPPServer;
-import com.juick.server.xmpp.router.XMPPRouter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -23,7 +19,6 @@ public class Application extends SpringBootServletInitializer {
}
public static void main(String[] args) {
- SpringApplication.run(new Class[]{ Application.class, XMPPRouter.class, XMPPServer.class,
- XMPPConnection.class, CommandsManager.class }, args);
+ SpringApplication.run(Application.class, args);
}
}
diff --git a/juick-www/src/test/java/com/juick/WebAppTests.java b/juick-www/src/test/java/com/juick/WebAppTests.java
index 8c475a62..3d8fd031 100644
--- a/juick-www/src/test/java/com/juick/WebAppTests.java
+++ b/juick-www/src/test/java/com/juick/WebAppTests.java
@@ -23,10 +23,6 @@ import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.css.StyleElement;
import com.gargoylesoftware.htmlunit.html.DomElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import com.juick.server.CommandsManager;
-import com.juick.server.XMPPConnection;
-import com.juick.server.XMPPServer;
-import com.juick.server.xmpp.router.XMPPRouter;
import com.juick.service.*;
import com.juick.util.MessageUtils;
import com.juick.www.WebApp;
@@ -74,8 +70,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@AutoConfigureMockMvc
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = { Application.class, XMPPRouter.class, XMPPServer.class,
- XMPPConnection.class, CommandsManager.class })
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = { Application.class})
public class WebAppTests {
@MockBean
private ImagesService imagesService;
@@ -97,12 +92,6 @@ public class WebAppTests {
private JdbcTemplate jdbcTemplate;
@Inject
private SubscriptionService subscriptionService;
- @Inject
- private XMPPServer xmpp;
- @Inject
- private XMPPConnection routerConnection;
- @Inject
- private XMPPRouter xmppRouter;
@Inject
private PebbleEngine pebbleEngine;
@@ -244,7 +233,7 @@ public class WebAppTests {
}
@Test
public void postMessageTests() throws Exception {
- assertThat(xmpp.getInConnections().size(), is(0));
+ //assertThat(xmpp.getInConnections().size(), is(0));
mockMvc.perform(post("/post2").param("body", "yo")).andExpect(redirectedUrl("http://localhost/login"));
MvcResult loginResult = mockMvc.perform(post("/login")
.param("username", ugnichName)