From c211776588ddc93b80547248da481490095274ee Mon Sep 17 00:00:00 2001 From: eliaporciani Date: Mon, 11 Mar 2019 21:51:30 +0100 Subject: [PATCH 1/3] Enabled tests for SEARCH-1476 and SEARCH-1455 --- .../e2e/insightEngine/sql/SelectStarTest.java | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java index 353bedf54..14f79a2b1 100644 --- a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java +++ b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java @@ -300,14 +300,13 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:id`< 12 and TYPE = 'expense:expenseReport'", 1); testSqlQuery("select * from alfresco where `expense:id` = 50", 1); - // TODO: Update on fix: Search-1476 - // testSqlQuery("select * from alfresco where `expense:id` in (10, 30, 0)", 2); - // testSqlQuery("select * from alfresco where `expense:id` not in (5, 10) and TYPE = 'expense:expenseReport'", 4); + testSqlQuery("select * from alfresco where `expense:id` in (10, 30, 0)", 2); + testSqlQuery("select * from alfresco where `expense:id` not in (5, 10) and TYPE = 'expense:expenseReport'", 4); testSqlQuery("select * from alfresco where expense_id = 50 and TYPE = 'expense:expenseReport'", 1); } - @Test(priority = 6, groups = { TestGroup.INSIGHT_11 }, enabled = false) + @Test(priority = 6, groups = { TestGroup.INSIGHT_11 }) public void testIntegerFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:id` = '*' and TYPE = 'expense:expenseReport'", 3); @@ -329,14 +328,13 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:EmpNo` >= 50", 1); testSqlQuery("select * from alfresco where `expense:EmpNo` = 1", 2); - // TODO: Update on fix: Search-1476 - // testSqlQuery("select * from alfresco where `expense:EmpNo` in (00001, 1, 50)", 2); - // testSqlQuery("select * from alfresco where `expense:EmpNo` not in (1, 50)", 2); + testSqlQuery("select * from alfresco where `expense:EmpNo` in (00001, 1, 50)", 2); + testSqlQuery("select * from alfresco where `expense:EmpNo` not in (1, 50) and TYPE = 'expense:expenseReport'", 2); testSqlQuery("select * from alfresco where expense_EmpNo = 56", 1); } - @Test(priority = 8, groups = { TestGroup.INSIGHT_11 }, enabled=false) + @Test(priority = 8, groups = { TestGroup.INSIGHT_11 }) public void testLongFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:EmpNo` = '*' and TYPE = 'expense:expenseReport'", 3); //4 @@ -357,14 +355,13 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:ExchangeRate` <= 12 and TYPE = 'expense:expenseReport'", 2); testSqlQuery("select * from alfresco where `expense:ExchangeRate` >= 12.5", 1); - // TODO: Update on fix: Search-1476 - // testSqlQuery("select * from alfresco where `expense:ExchangeRate` in (12, 10)", 2); - // testSqlQuery("select * from alfresco where `expense:ExchangeRate` not in (12.5, 100) and TYPE = 'expense:expenseReport'", 4); + testSqlQuery("select * from alfresco where `expense:ExchangeRate` in (12, 10)", 2); + testSqlQuery("select * from alfresco where `expense:ExchangeRate` not in (12.5, 100) and TYPE = 'expense:expenseReport'", 4); testSqlQuery("select * from alfresco where expense_ExchangeRate = 12.5", 1); } - @Test(priority = 10, groups = { TestGroup.INSIGHT_11 }, enabled = false) + @Test(priority = 10, groups = { TestGroup.INSIGHT_11 }) public void testDoubleFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:ExchangeRate` = '*' and TYPE = 'expense:expenseReport'", 3); //4 @@ -377,8 +374,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:ExchangeRate` is not null and TYPE = 'expense:expenseReport'", 3); } - // TODO: Enable the test when fixed: Bug: Search-1455 - @Test(priority = 11, groups = { TestGroup.INSIGHT_11 }, enabled = false) + @Test(priority = 11, groups = { TestGroup.INSIGHT_11 }) public void testFloatField() throws Exception { testSqlQuery("select * from alfresco where `expense:amount` >= '60.50'", 2); @@ -392,7 +388,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_amount = 60", 1); } - @Test(priority = 12, groups = { TestGroup.INSIGHT_11 }, enabled=false) + @Test(priority = 12, groups = { TestGroup.INSIGHT_11 }) public void testFloatFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:amount` >= '60.50'", 2); @@ -416,7 +412,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_Approved = 'true' and `expense:Location` = 'Paris'", 0); } - @Test(priority = 14, groups = { TestGroup.INSIGHT_11 }, enabled = false) + @Test(priority = 14, groups = { TestGroup.INSIGHT_11 }) public void testBooleanFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:Approved` = '*' and TYPE = 'expense:expenseReport'", 3); //4 @@ -466,7 +462,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:ExpenseDate` is null and TYPE = 'expense:expenseReport'", 2); //4 testSqlQuery("select * from alfresco where `expense:ExpenseDate` is not null and TYPE = 'expense:expenseReport'", 3); //0 - } + } @Test(priority = 17, groups = { TestGroup.INSIGHT_11 }) public void testDateTimeField() throws Exception From fca008d48a0b17a7555d8b80df97d2651dfc9481 Mon Sep 17 00:00:00 2001 From: eliaporciani Date: Tue, 12 Mar 2019 16:46:10 +0100 Subject: [PATCH 2/3] test fixed. set back to disable some tests. --- .../e2e/insightEngine/sql/SelectStarTest.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java index 14f79a2b1..5dde66b72 100644 --- a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java +++ b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java @@ -306,7 +306,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_id = 50 and TYPE = 'expense:expenseReport'", 1); } - @Test(priority = 6, groups = { TestGroup.INSIGHT_11 }) + @Test(priority = 6, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testIntegerFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:id` = '*' and TYPE = 'expense:expenseReport'", 3); @@ -329,12 +329,12 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where `expense:EmpNo` = 1", 2); testSqlQuery("select * from alfresco where `expense:EmpNo` in (00001, 1, 50)", 2); - testSqlQuery("select * from alfresco where `expense:EmpNo` not in (1, 50) and TYPE = 'expense:expenseReport'", 2); + testSqlQuery("select * from alfresco where `expense:EmpNo` not in (1, 50) and TYPE = 'expense:expenseReport'", 3); testSqlQuery("select * from alfresco where expense_EmpNo = 56", 1); } - @Test(priority = 8, groups = { TestGroup.INSIGHT_11 }) + @Test(priority = 8, groups = { TestGroup.INSIGHT_11 }, enabled=false) public void testLongFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:EmpNo` = '*' and TYPE = 'expense:expenseReport'", 3); //4 @@ -361,7 +361,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_ExchangeRate = 12.5", 1); } - @Test(priority = 10, groups = { TestGroup.INSIGHT_11 }) + @Test(priority = 10, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testDoubleFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:ExchangeRate` = '*' and TYPE = 'expense:expenseReport'", 3); //4 @@ -379,16 +379,17 @@ public class SelectStarTest extends AbstractSearchServiceE2E { testSqlQuery("select * from alfresco where `expense:amount` >= '60.50'", 2); testSqlQuery("select * from alfresco where `expense:amount` >= 60", 3); - testSqlQuery("select * from alfresco where `expense:amount` <= 60 and TYPE = 'expense:expenseReport'", 2); - testSqlQuery("select * from alfresco where `expense:amount` = 60", 21); + testSqlQuery("select * from alfresco where `expense:amount` <= 60 and TYPE = 'expense:expenseReport'", 1); + testSqlQuery("select * from alfresco where `expense:amount` = 60", 1); testSqlQuery("select * from alfresco where `expense:amount` in (60, 100)", 2); - testSqlQuery("select * from alfresco where `expense:amount` not in (60.5, 100) and TYPE = 'expense:expenseReport'", 2); - testSqlQuery("select * from alfresco where `expense:amount` not in (60.5, 100, null) and TYPE = 'expense:expenseReport'", 1); + testSqlQuery("select * from alfresco where `expense:amount` not in (60.5, 100) and TYPE = 'expense:expenseReport'", 3); + // unsupported? + // testSqlQuery("select * from alfresco where `expense:amount` not in (60.5, 100, null) and TYPE = 'expense:expenseReport'", 1); testSqlQuery("select * from alfresco where expense_amount = 60", 1); } - @Test(priority = 12, groups = { TestGroup.INSIGHT_11 }) + @Test(priority = 12, groups = { TestGroup.INSIGHT_11 }, enabled=false) public void testFloatFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:amount` >= '60.50'", 2); @@ -412,7 +413,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_Approved = 'true' and `expense:Location` = 'Paris'", 0); } - @Test(priority = 14, groups = { TestGroup.INSIGHT_11 }) + @Test(priority = 14, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testBooleanFieldNullValues() throws Exception { testSqlQuery("select * from alfresco where `expense:Approved` = '*' and TYPE = 'expense:expenseReport'", 3); //4 From 5c8eedb541d16d54f733832bd7f2bbfb56910c06 Mon Sep 17 00:00:00 2001 From: eliaporciani Date: Tue, 12 Mar 2019 19:18:08 +0100 Subject: [PATCH 3/3] Added comments on tests that need to be enabled when SEARCH-1457 will be solved --- .../e2e/insightEngine/sql/SelectStarTest.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java index cbe7b4f06..02aa24a99 100644 --- a/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java +++ b/e2e-test/src/test/java/org/alfresco/service/search/e2e/insightEngine/sql/SelectStarTest.java @@ -272,7 +272,8 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_Notes = 'Paris'", 1); } - + + // TODO: Update on fix: Search-1457 @Test(priority = 4, groups = { TestGroup.INSIGHT_11 }, enabled=false) public void testMLTextFieldNullValues() { @@ -302,6 +303,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_id = 50 and TYPE = 'expense:expenseReport'", 1); } + // TODO: Update on fix: Search-1457 @Test(priority = 6, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testIntegerFieldNullValues() { @@ -329,7 +331,8 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_EmpNo = 56", 1); } - + + // TODO: Update on fix: Search-1457 @Test(priority = 8, groups = { TestGroup.INSIGHT_11 }, enabled=false) public void testLongFieldNullValues() { @@ -356,7 +359,9 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_ExchangeRate = 12.5", 1); } - + + + // TODO: Update on fix: Search-1457 @Test(priority = 10, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testDoubleFieldNullValues() { @@ -385,6 +390,7 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_amount = 60", 1); } + // TODO: Update on fix: Search-1457 @Test(priority = 12, groups = { TestGroup.INSIGHT_11 }, enabled=false) public void testFloatFieldNullValues() { @@ -408,7 +414,8 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_Approved = 'true' and `expense:Location` = 'Paris'", 0); } - + + // TODO: Update on fix: Search-1457 @Test(priority = 14, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testBooleanFieldNullValues() { @@ -447,7 +454,8 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_ExpenseDate >= '1970-02-01T01:01:01Z' and TYPE = 'expense:expenseReport'", 3); } - + + // TODO: Update on fix: Search-1457 @Test(priority = 16, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testDateFieldNullValues() { @@ -479,7 +487,8 @@ public class SelectStarTest extends AbstractSearchServiceE2E testSqlQuery("select * from alfresco where expense_Recorded_At >= '1970-02-01T01:01:01Z' and TYPE = 'expense:expenseReport'", 3); } - + + // TODO: Update on fix: Search-1457 @Test(priority = 18, groups = { TestGroup.INSIGHT_11 }, enabled = false) public void testDateTimeFieldNullValues() {