-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove libs, use published test jars and bring integration tests
Signed-off-by: Ravi Rajamani <[email protected]>
- Loading branch information
Ravi Rajamani
committed
Sep 15, 2020
1 parent
f9abf74
commit cbe63e6
Showing
15 changed files
with
662 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/** | ||
* Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
*/ | ||
|
||
def withoutLogger = { exclude group: 'org.slf4j', module: 'slf4j-log4j12' | ||
exclude group: 'org.slf4j', module: 'slf4j-simple' } | ||
|
||
configurations.all { | ||
resolutionStrategy { | ||
force "com.google.code.gson:gson:2.5" | ||
} | ||
} | ||
|
||
dependencies { | ||
compile "io.pravega:pravega-common:${pravegaVersion}", | ||
"io.pravega:pravega-shared-metrics:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-contracts:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-storage:${pravegaVersion}" | ||
compile "io.pravega:pravega-test-testcommon:${pravegaVersion}" | ||
compile group:"io.pravega", name:"pravega-segmentstore-storage", version: pravegaVersion, classifier: 'tests' | ||
compile group: 'com.google.guava', name: 'guava', version: guavaVersion | ||
testCompile 'org.glassfish.jersey.core:jersey-common:2.28' | ||
|
||
//For Extended S3 | ||
compile group: 'com.emc.ecs', name: 'object-client', version: ecsObjectClientVersion, withoutLogger | ||
testCompile group: 'org.gaul', name: 's3proxy', version: '1.5.5' | ||
testCompile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1' | ||
testCompile group: 'org.apache.jclouds.provider', name: 'google-cloud-storage', version: '2.1.1' | ||
|
||
compile "io.pravega:pravega-common:${pravegaVersion}", | ||
"io.pravega:pravega-shared-metrics:${pravegaVersion}", | ||
"io.pravega:pravega-shared-protocol:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-contracts:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-storage:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-server:${pravegaVersion}", | ||
"io.pravega:pravega-segmentstore-server-host:${pravegaVersion}", | ||
"io.pravega:pravega-controller:${pravegaVersion}", | ||
"io.pravega:pravega-client:${pravegaVersion}" | ||
compile "io.pravega:pravega-test-testcommon:${pravegaVersion}" | ||
compile group: 'junit', name:'junit', version: junitVersion | ||
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion | ||
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion | ||
testCompile group: 'org.apache.commons', name: 'commons-csv', version: apacheCommonsCsvVersion | ||
compile group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion, withoutLogger | ||
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion, withoutLogger | ||
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs-client', version: hadoopVersion, withoutLogger | ||
compile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion, withoutLogger | ||
compile group: 'io.netty', name: 'netty-codec-http', version: nettyVersion | ||
compile group:"io.pravega", name:"pravega-segmentstore-server-host", version: pravegaVersion, classifier: 'tests' | ||
compile group:"io.pravega", name:"pravega-segmentstore-server", version: pravegaVersion, classifier: 'tests' | ||
// compile files(project(':hdfs').sourceSets.test.output) | ||
// compile files(project(':extendeds3').sourceSets.test.output) | ||
// compile files("$rootDir/libs/pravega-segmentstore-server-host-0.9.0-2641.ea37ccadc-issue-5124-use-maven-plugin-tests.jar") | ||
// compile files("$rootDir/libs/pravega-segmentstore-server-0.9.0-2641.ea37ccadc-issue-5124-use-maven-plugin-tests.jar") | ||
|
||
} | ||
|
||
javadoc { | ||
dependsOn delombok | ||
source = delombok.outputDir | ||
failOnError = true | ||
} | ||
|
||
configurations.all { | ||
exclude group: "org.slf4j", module: "slf4j-log4j12" | ||
} | ||
|
||
task integrationTest(type: Test) { | ||
description = 'Runs integration tests.' | ||
group = 'verification' | ||
|
||
outputs.upToDateWhen { false } | ||
|
||
testFramework { | ||
useJUnit { | ||
// includeCategories 'io.pravega.test.integration.ExtendedS3IntegrationTest' | ||
excludeCategories 'io.pravega.storage.extendeds3.ExtendedS3StorageTest' | ||
excludeCategories 'io.pravega.storage.extendeds3.ExtendedS3StorageConfigTest' | ||
} | ||
} | ||
|
||
shouldRunAfter test | ||
} | ||
|
||
test { | ||
testFramework { | ||
useJUnit { | ||
excludeCategories 'io.pravega.test.integration.ExtendedS3IntegrationTest' | ||
// includeCategories 'io.pravega.storage.extendeds3.ExtendedS3StorageTest' | ||
// includeCategories 'io.pravega.storage.extendeds3.ExtendedS3StorageConfigTest' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) Dell Inc., or its subsidiaries. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
--> | ||
<configuration scan="true" scanPeriod="30 seconds"> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<charset>UTF-8</charset> | ||
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
</configuration> |
22 changes: 22 additions & 0 deletions
22
extendeds3/integration/src/test/resources/logback-test.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) Dell Inc., or its subsidiaries. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
--> | ||
<configuration scan="true" scanPeriod="30 seconds"> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<charset>UTF-8</charset> | ||
<Pattern>%d %-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
</configuration> |
16 changes: 0 additions & 16 deletions
16
extendeds3/src/main/java/io/pravega/storage/extendeds3/TestClass.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
extendeds3/src/test/java/io/pravega/storage/extendeds3/TestClassTest.java
This file was deleted.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
extendeds3/src/test/java/io/pravega/test/BookKeeperIntegrationTestBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/** | ||
* Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package io.pravega.test.integration; | ||
|
||
import io.pravega.common.io.FileHelpers; | ||
import io.pravega.segmentstore.server.host.BookKeeperRunner; | ||
import io.pravega.segmentstore.server.store.ServiceBuilderConfig; | ||
import io.pravega.segmentstore.server.store.ServiceConfig; | ||
import io.pravega.segmentstore.server.store.StreamSegmentStoreTestBase; | ||
import java.io.File; | ||
import java.nio.file.Files; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Base class for any StreamSegmentStore Integration Test that uses BookKeeper. | ||
*/ | ||
abstract class BookKeeperIntegrationTestBase extends StreamSegmentStoreTestBase { | ||
private static final int BOOKIE_COUNT = 1; | ||
@Getter(AccessLevel.PROTECTED) | ||
private File baseDir = null; | ||
@Getter(AccessLevel.PROTECTED) | ||
private BookKeeperRunner bookkeeper = null; | ||
|
||
/** | ||
* Starts BookKeeper. | ||
* | ||
* NOTE: this (and tearDown()) cannot be annotated with @Before and @After since JUnit doesn't pick these up from | ||
* super classes, at least not in the order in which we expect it to) | ||
*/ | ||
protected void setUp() throws Exception { | ||
bookkeeper = new BookKeeperRunner(this.configBuilder, BOOKIE_COUNT); | ||
bookkeeper.initialize(); | ||
|
||
this.baseDir = Files.createTempDirectory("IntegrationTest").toFile().getAbsoluteFile(); | ||
} | ||
|
||
/** | ||
* Shuts down BookKeeper and cleans up file system directory. | ||
*/ | ||
protected void tearDown() throws Exception { | ||
bookkeeper.close(); | ||
if (baseDir != null) { | ||
FileHelpers.deleteFileOrDirectory(this.baseDir); | ||
} | ||
|
||
this.baseDir = null; | ||
} | ||
|
||
/** | ||
* Creates a ServiceBuilderConfig based on the given builder. | ||
* | ||
* @param configBuilder The ServiceBuilderConfig.Builder to base from (this builder will not be touched). | ||
* @param instanceId The instance id of the Service to build (for least interference, different instances should have | ||
* different Ids so that shared resources can be setup appropriately). | ||
* @return A ServiceBuilderConfig instance. | ||
*/ | ||
protected ServiceBuilderConfig getBuilderConfig(ServiceBuilderConfig.Builder configBuilder, int instanceId) { | ||
String id = Integer.toString(instanceId); | ||
return configBuilder | ||
.makeCopy() | ||
.include(ServiceConfig.builder().with(ServiceConfig.INSTANCE_ID, id)) | ||
.build(); | ||
} | ||
|
||
@Override | ||
protected double getFencingTestOperationMultiplier() { | ||
return 0.3; // Adding operations one-by-one using BookKeeper is much slower than bulk-adding them. | ||
} | ||
} |
Oops, something went wrong.