Skip to content

Commit c29503a

Browse files
committed
fixing tests and bug
1 parent 5610e79 commit c29503a

File tree

4 files changed

+38
-11
lines changed

4 files changed

+38
-11
lines changed

marklogic-data-hub/src/main/java/com/marklogic/hub/commands/LoadHubModulesCommand.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ public void execute(CommandContext context) {
183183
ExtensionMetadataAndParams emap = extensionMetadataProvider.provideExtensionMetadataAndParams(r);
184184
this.modulesLoader.installTransform(r, emap.metadata);
185185
}
186+
resources = findResources("classpath*:/ml-modules/transforms", "/**/*.sjs");
187+
for (Resource r : resources) {
188+
ExtensionMetadataAndParams emap = extensionMetadataProvider.provideExtensionMetadataAndParams(r);
189+
this.modulesLoader.installTransform(r, emap.metadata);
190+
}
186191
endTime = System.nanoTime();
187192
duration = (endTime - startTime);
188193
logger.info("Rest Transforms took: " + (duration / 1000000000) + " seconds");

marklogic-data-hub/src/test/java/com/marklogic/hub/HubTestBase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public class HubTestBase {
5656
public static int stagingPort;
5757
public static int finalPort;
5858
public static int tracePort;
59+
public static int jobPort;
5960
public static String user;
6061
public static String password;
6162
public static Authentication authMethod;
@@ -65,6 +66,8 @@ public class HubTestBase {
6566
public static DatabaseClient finalModulesClient = null;
6667
public static DatabaseClient traceClient = null;
6768
public static DatabaseClient traceModulesClient = null;
69+
public static DatabaseClient jobClient = null;
70+
public static DatabaseClient jobModulesClient = null;
6871
private static Properties properties = new Properties();
6972
private static boolean initialized = false;
7073
public static XMLDocumentManager stagingDocMgr = getStagingMgr();
@@ -120,6 +123,7 @@ private static void init() {
120123
stagingPort = Integer.parseInt(properties.getProperty("mlStagingPort"));
121124
finalPort = Integer.parseInt(properties.getProperty("mlFinalPort"));
122125
tracePort = Integer.parseInt(properties.getProperty("mlTracePort"));
126+
jobPort = Integer.parseInt(properties.getProperty("mlJobPort"));
123127
user = properties.getProperty("mlUsername");
124128
password = properties.getProperty("mlPassword");
125129
authMethod = Authentication.valueOf(properties.getProperty("auth").toUpperCase());
@@ -130,6 +134,8 @@ private static void init() {
130134
finalModulesClient = DatabaseClientFactory.newClient(host, stagingPort, HubConfig.DEFAULT_MODULES_DB_NAME, user, password, authMethod);
131135
traceClient = DatabaseClientFactory.newClient(host, tracePort, user, password, authMethod);
132136
traceModulesClient = DatabaseClientFactory.newClient(host, stagingPort, HubConfig.DEFAULT_MODULES_DB_NAME, user, password, authMethod);
137+
jobClient = DatabaseClientFactory.newClient(host, jobPort, user, password, authMethod);
138+
jobModulesClient = DatabaseClientFactory.newClient(host, stagingPort, HubConfig.DEFAULT_MODULES_DB_NAME, user, password, authMethod);
133139
}
134140

135141
public HubTestBase() {
@@ -154,6 +160,7 @@ protected static HubConfig getHubConfig(String projectDir) {
154160
hubConfig.stagingPort = stagingPort;
155161
hubConfig.finalPort = finalPort;
156162
hubConfig.tracePort = tracePort;
163+
hubConfig.jobPort = jobPort;
157164
hubConfig.username = user;
158165
hubConfig.password = password;
159166
return hubConfig;

marklogic-data-hub/src/test/java/com/marklogic/hub/TraceManagerTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
package com.marklogic.hub;
22

3+
import org.junit.AfterClass;
4+
import org.junit.BeforeClass;
35
import org.junit.Test;
46

7+
import java.io.IOException;
8+
59
public class TraceManagerTest extends HubTestBase {
10+
@BeforeClass
11+
public static void setup() throws IOException {
12+
installHub();
13+
}
14+
15+
@AfterClass
16+
public static void teardown() throws IOException {
17+
uninstallHub();
18+
}
19+
620
@Test
721
public void getTraces() throws Exception {
822
TraceManager tm = new TraceManager(traceClient);

quick-start/src/main/ui/app/login/login.e2e.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ describe('App', () => {
1414

1515
browser.get('/login');
1616

17-
// clear out any items in the project list
18-
return element.all(by.css('select-list md-list-item .fa-trash')).map(item => {
19-
return item.click().then(() => {
20-
let removeButton = element.all(by.css('confirm-component button')).first();
21-
return browser.wait(ec.elementToBeClickable(removeButton)).then(() => {
22-
return removeButton.click().then(() => {
23-
return browser.wait(ec.not(ec.presenceOf(removeButton)));
24-
});
25-
});
26-
});
27-
});
17+
// // clear out any items in the project list
18+
// return element.all(by.css('select-list md-list-item .fa-trash')).map(item => {
19+
// return item.click().then(() => {
20+
// let removeButton = element.all(by.css('confirm-component button')).first();
21+
// return browser.wait(ec.elementToBeClickable(removeButton)).then(() => {
22+
// return removeButton.click().then(() => {
23+
// return browser.wait(ec.not(ec.presenceOf(removeButton)));
24+
// });
25+
// });
26+
// });
27+
// });
2828
});
2929

3030
beforeEach(() => {
@@ -175,6 +175,7 @@ describe('App', () => {
175175
return finishedButton.click();
176176
}).then(() => {
177177
browser.waitForAngular();
178+
browser.sleep(5000);
178179
browser.getCurrentUrl().then(url => {
179180
expect(url.endsWith('/login')).toBe(false);
180181
expect(url.endsWith('/')).toBe(true);

0 commit comments

Comments
 (0)