Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,28 @@
</properties>

<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
package org.apache.hadoop.applications.mawo.server.common;


import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
* Test MaWo configuration.
Expand All @@ -31,29 +33,29 @@ public class TestMaWoConfiguration {
* Validate default MaWo Configurations.
*/
@Test
public void testMaWoConfiguration() {
void testMaWoConfiguration() {

MawoConfiguration mawoConf = new MawoConfiguration();

// validate Rpc server port
Assert.assertEquals(mawoConf.getRpcServerPort(), 5120);
assertEquals(mawoConf.getRpcServerPort(), 5120);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you fix the order of the argument as follows?

assertEquals(5120, mawoConf.getRpcServerPort());


// validate Rpc hostname
Assert.assertTrue("localhost".equals(mawoConf.getRpcHostName()));
assertEquals("localhost", mawoConf.getRpcHostName());

// validate job queue storage conf
boolean jobQueueStorage = mawoConf.getJobQueueStorageEnabled();
Assert.assertTrue(jobQueueStorage);
assertTrue(jobQueueStorage);

// validate default teardownWorkerValidity Interval
Assert.assertEquals(mawoConf.getTeardownWorkerValidityInterval(), 120000);
assertEquals(mawoConf.getTeardownWorkerValidityInterval(), 120000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be assertEquals(120000, mawoConf.getTeardownWorkerValidityInterval());


// validate Zk related configs
Assert.assertTrue("/tmp/mawoRoot".equals(mawoConf.getZKParentPath()));
Assert.assertTrue("localhost:2181".equals(mawoConf.getZKAddress()));
Assert.assertEquals(1000, mawoConf.getZKRetryIntervalMS());
Assert.assertEquals(10000, mawoConf.getZKSessionTimeoutMS());
Assert.assertEquals(1000, mawoConf.getZKRetriesNum());
assertEquals("/tmp/mawoRoot", mawoConf.getZKParentPath());
assertEquals("localhost:2181", mawoConf.getZKAddress());
assertEquals(1000, mawoConf.getZKRetryIntervalMS());
assertEquals(10000, mawoConf.getZKSessionTimeoutMS());
assertEquals(1000, mawoConf.getZKRetriesNum());
}


Expand Down