PakhomovAlexander commented on code in PR #3655: URL: https://github.com/apache/ignite-3/pull/3655#discussion_r1577823643
########## modules/compute/jobs.gradle: ########## @@ -0,0 +1,87 @@ +/* + * 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. + */ + +sourceSets { + jobs + unit1 + unit2 +} + +def registerJarTask(SourceSet sourceSet, String baseName) { + tasks.register(sourceSet.jarTaskName, Jar) { + group = 'build' + archiveBaseName = baseName + archiveVersion = '1.0-SNAPSHOT' + from sourceSet.output + } +} + +registerJarTask(sourceSets.jobs, 'ignite-it-jobs') +registerJarTask(sourceSets.unit1, 'ignite-ut-job1') Review Comment: could you rename `it` and `ut` into `integration-test` and `unit-test`. It would be easier to understand the purpose of these jars then. ########## modules/compute/build.gradle: ########## @@ -19,6 +19,7 @@ apply from: "$rootDir/buildscripts/java-core.gradle" apply from: "$rootDir/buildscripts/publishing.gradle" apply from: "$rootDir/buildscripts/java-junit5.gradle" apply from: "$rootDir/buildscripts/java-integration-test.gradle" +apply from: 'jobs.gradle' Review Comment: Maybe it will be more consistent if we put this script into `compute/buildscripts/jobs.gradle`? ########## modules/compute/src/unit2/java/org/my/job/compute/unit/UnitJob.java: ########## @@ -0,0 +1,29 @@ +/* + * 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.my.job.compute.unit; + +import org.apache.ignite.compute.ComputeJob; +import org.apache.ignite.compute.JobExecutionContext; + +/** Compute job. */ +public class UnitJob implements ComputeJob<String> { Review Comment: Can you adjust the readme or mention it somewhere in javadoc: "How to add new job for testing." ########## modules/compute/jobs.gradle: ########## @@ -0,0 +1,87 @@ +/* + * 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. + */ + +sourceSets { + jobs + unit1 + unit2 +} + +def registerJarTask(SourceSet sourceSet, String baseName) { + tasks.register(sourceSet.jarTaskName, Jar) { + group = 'build' + archiveBaseName = baseName + archiveVersion = '1.0-SNAPSHOT' Review Comment: I think the groupName matters here. `org.example` is not the best one. could you please change it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
