zstan commented on code in PR #13123: URL: https://github.com/apache/ignite/pull/13123#discussion_r3232889694
########## modules/core/src/test/java/org/apache/ignite/internal/util/IgniteBuildInfoPropertiesTest.java: ########## @@ -0,0 +1,80 @@ +/* + * 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.ignite.internal.util; + +import java.io.File; +import java.io.FileWriter; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.nio.file.Files; +import org.apache.ignite.internal.IgniteProperties; +import org.apache.ignite.internal.IgniteVersionUtils; +import org.apache.ignite.internal.util.typedef.internal.U; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; + +/** */ +public class IgniteBuildInfoPropertiesTest extends GridCommonAbstractTest { + /** */ + @Test + public void testLoadsBuildInfoProperties() { + String ver = IgniteProperties.get("ignite.version"); + String build = IgniteProperties.get("ignite.build"); + String rev = IgniteProperties.get("ignite.revision"); + String relDate = IgniteProperties.get("ignite.rel.date"); + + assertNotNull(ver); + assertNotNull(build); + assertNotNull(rev); + assertNotNull(relDate); + } + + /** */ + @Test + public void testUserIgnitePropertiesDoesNotOverrideBuildMetadata() throws Exception { Review Comment: Sorry, but i don\`t understand this test. I see that you append one more "ignite.properties" into ClassPath and check that it been overwritten with ordinal "ignite.properties", correct ? But it depend on ordering in class path, isn\`t it ? I think if more than one resouce been found in ClassPath it\`s not determined somehow - what will be used finally, or i miss smth ? -- 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]
