Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
mongo corrections, groups in AT files
Browse files Browse the repository at this point in the history
mongo changes
  • Loading branch information
alejandro2003 authored and aaitor committed Mar 22, 2016
1 parent 6c526a2 commit c4d2d43
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATAlter extends BaseTest {
public ATAlter() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void alterStreamTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATCreation extends BaseTest {
public ATCreation() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void createStreamTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATDeletion extends BaseTest {
public ATDeletion() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void deleteStreamTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATIndex extends BaseTest {
public ATIndex() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void createStreamTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATListen extends BaseTest {
public ATListen() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void listenToStreamTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATLowACK extends BaseTest {
public ATLowACK() {
}

@Test(enabled = true, priority = 999)
@Test(enabled = true, groups = {"basic"})
public void lowACKTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATQueries extends BaseTest {
public ATQueries() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void streamQueriesTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATSaveToCassandra extends BaseTest {
public ATSaveToCassandra() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void saveToCassandraTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATSaveToMongo extends BaseTest {
public ATSaveToMongo() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void saveToMongoTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATStopIndex extends BaseTest {
public ATStopIndex() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void stopIndexTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATStopListen extends BaseTest {
public ATStopListen() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void stopListenTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATStopSaveToCassandra extends BaseTest {
public ATStopSaveToCassandra() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void stopSaveCassandraTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ATStopSaveToMongo extends BaseTest {
public ATStopSaveToMongo() {
}

@Test(enabled = true, priority = 1)
@Test(enabled = true, groups = {"basic"})
public void StopSaveMongoTest() throws Exception {
new CucumberRunner(this.getClass()).runCukes();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Feature: Save to mongo

Background:
Given I drop every existing stream
Given I connect to 'Mongo' cluster at '${MONGO_HOST}'

Scenario: Saving from an unexistent stream
When I start saving to MongoDB a stream with name 'unexistantStream'
Expand All @@ -16,38 +17,38 @@ Feature: Save to mongo
When I start saving to MongoDB a stream with name 'mongoSaveStream'
Then the stream 'mongoSaveStream' has 'SAVE_TO_MONGO' as active actions
And I insert into a stream with name 'mongoSaveStream' this data:
| 1 | a |
| 1 | a |
| 2 | 4 |
And I wait '30' seconds
Then an exception 'IS NOT' thrown
And a Mongo dataBase 'stratiostreaming' contains a table 'mongoSaveStream' with values:
And a Mongo dataBase 'stratio_decision' contains a table 'mongoSaveStream' with values:
| 1-String | 2-Integer |
| a | 4 |

Scenario Outline: Saving from an nice existent stream, with unnacepted mongo fields
When I create a stream with name 'mongobadColsSaveStream' and columns (with type):
| <columnName> | String |
When I start saving to MongoDB a stream with name 'mongobadColsSaveStream'
When I start saving to MongoDB a stream with name 'mongobadColsSaveStream'
And I insert into a stream with name 'mongobadColsSaveStream' this data:
| <columnName> | a |
| <columnName> | a |
And I wait '30' seconds
Then an exception 'IS NOT' thrown
And a Mongo dataBase 'stratiostreaming' doesnt contains a table 'mongobadColsSaveStream'
And a Mongo dataBase 'stratio_decision' doesnt contains a table 'mongobadColsSaveStream'

Examples:
| columnName |
| a.value |
| a$value |

Scenario Outline: Saving unnacepted streams at Mongo
When I create a stream with name '<streamName>' and columns (with type):
| 1 | String |
| 2 | Integer |
When I start saving to Mongo a stream with name '<streamName>'
When I start saving to MongoDB a stream with name '<streamName>'
Then an exception 'IS' thrown with class 'StratioAPISecurityException' and message like '<message>'

Examples:
| streamName | message |
| streamName | message |
| | Stream name cannot be empty |
| //NULL// | Stream name cannot be null |
| $tream | Stream name .*? is not compatible with |
Expand Down

0 comments on commit c4d2d43

Please sign in to comment.