-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce "real" integration tests #778
Merged
+351
−11
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 25 additions & 0 deletions
25
.../service/src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusApplicationIT.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,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import org.apache.polaris.service.it.test.PolarisApplicationIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusApplicationIT extends PolarisApplicationIntegrationTest {} |
26 changes: 26 additions & 0 deletions
26
...ce/src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusManagementServiceIT.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,26 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import org.apache.polaris.service.it.test.PolarisManagementServiceIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusManagementServiceIT | ||
extends PolarisManagementServiceIntegrationTest {} |
25 changes: 25 additions & 0 deletions
25
.../service/src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogIT.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,25 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import org.apache.polaris.service.it.test.PolarisRestCatalogIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusRestCatalogIT extends PolarisRestCatalogIntegrationTest {} | ||
40 changes: 40 additions & 0 deletions
40
...e/src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogViewAwsIT.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,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import java.lang.reflect.Field; | ||
import java.nio.file.Path; | ||
import org.apache.iceberg.view.ViewCatalogTests; | ||
import org.apache.polaris.service.it.test.PolarisRestCatalogViewAwsIntegrationTest; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusRestCatalogViewAwsIT | ||
extends PolarisRestCatalogViewAwsIntegrationTest { | ||
|
||
@BeforeEach | ||
public void setUpTempDir(@TempDir Path tempDir) throws Exception { | ||
// see https://github.com/quarkusio/quarkus/issues/13261 | ||
Field field = ViewCatalogTests.class.getDeclaredField("tempDir"); | ||
field.setAccessible(true); | ||
field.set(this, tempDir); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogViewAzureIT.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,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import java.lang.reflect.Field; | ||
import java.nio.file.Path; | ||
import org.apache.iceberg.view.ViewCatalogTests; | ||
import org.apache.polaris.service.it.test.PolarisRestCatalogViewAzureIntegrationTest; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusRestCatalogViewAzureIT | ||
extends PolarisRestCatalogViewAzureIntegrationTest { | ||
|
||
@BeforeEach | ||
public void setUpTempDir(@TempDir Path tempDir) throws Exception { | ||
// see https://github.com/quarkusio/quarkus/issues/13261 | ||
Field field = ViewCatalogTests.class.getDeclaredField("tempDir"); | ||
field.setAccessible(true); | ||
field.set(this, tempDir); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
.../src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogViewFileIT.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,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import java.lang.reflect.Field; | ||
import java.nio.file.Path; | ||
import org.apache.iceberg.view.ViewCatalogTests; | ||
import org.apache.polaris.service.it.test.PolarisRestCatalogViewFileIntegrationTest; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusRestCatalogViewFileIT | ||
extends PolarisRestCatalogViewFileIntegrationTest { | ||
|
||
@BeforeEach | ||
public void setUpTempDir(@TempDir Path tempDir) throws Exception { | ||
// see https://github.com/quarkusio/quarkus/issues/13261 | ||
Field field = ViewCatalogTests.class.getDeclaredField("tempDir"); | ||
field.setAccessible(true); | ||
field.set(this, tempDir); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...e/src/intTest/java/org/apache/polaris/service/quarkus/it/QuarkusRestCatalogViewGcpIT.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,40 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you 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 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import java.lang.reflect.Field; | ||
import java.nio.file.Path; | ||
import org.apache.iceberg.view.ViewCatalogTests; | ||
import org.apache.polaris.service.it.test.PolarisRestCatalogViewGcpIntegrationTest; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.io.TempDir; | ||
|
||
@QuarkusIntegrationTest | ||
public class QuarkusRestCatalogViewGcpIT | ||
extends PolarisRestCatalogViewGcpIntegrationTest { | ||
|
||
@BeforeEach | ||
public void setUpTempDir(@TempDir Path tempDir) throws Exception { | ||
// see https://github.com/quarkusio/quarkus/issues/13261 | ||
Field field = ViewCatalogTests.class.getDeclaredField("tempDir"); | ||
field.setAccessible(true); | ||
field.set(this, tempDir); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
*/ | ||
package org.apache.polaris.service.quarkus.it; | ||
|
||
import io.quarkus.test.junit.QuarkusTest; | ||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
import org.apache.polaris.service.it.test.PolarisSparkIntegrationTest; | ||
|
||
@QuarkusTest | ||
public class QuarkusSparkIntegrationTest extends PolarisSparkIntegrationTest {} | ||
@QuarkusIntegrationTest | ||
public class QuarkusSparkIT extends PolarisSparkIntegrationTest {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this test from the |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: if tests can work with the same server, it might be an option to rung them via a JUnit5 "suite". This way we can have only one class that references the package of tests from
polaris-test
and also leverage JUnit5 parallelism as opposed to Gradle test parallelism.I did not do that under DW only because it was hard to share DW servers between test threads. Now, it looks like all tests are segregated by in entity names and servers are in a separate JVM... so it might work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I haven't used JUnit5 suites. Mind if we do your suggestion in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolutely (it's one additional dependency for the "suite" engine, by the way)