Skip to content
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

Fix credentials tests and add functionality to view diff in adxsnapshots #803

Merged
merged 3 commits into from
Mar 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ reports
.idea
*.iml
Tools/7-Zip
.gitrevision

# Sensitive files
*.keys
Expand Down Expand Up @@ -179,4 +180,4 @@ AutoRest/Generators/Ruby/*/RspecTests/Generated/*
dnx-clr-win-x86*/
dnx-coreclr-win-x86*/
*.lock.json
/dnx
/dnx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ uploadArchives {
}
}

task versionInfo(type:Exec){
commandLine 'git rev-parse HEAD'.split()
ext.versionfile = new File("${projectDir}/.gitrevision")
standardOutput = new ByteArrayOutputStream()

doLast {
versionfile.text = "Azure/autorest#" + standardOutput.toString()
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
Expand All @@ -96,12 +106,13 @@ task javadoc(type: Javadoc) {
options.encoding = 'UTF-8'
}

task javadocJar(type: Jar, dependsOn: javadoc) {
task javadocJar(type: Jar, dependsOn: [javadoc, versionInfo]) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
archives javadocJar
archives file: file("${projectDir}/.gitrevision")
}
13 changes: 12 additions & 1 deletion ClientRuntimes/Java/azure-client-authentication/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ test {
}
}

task versionInfo(type:Exec){
commandLine 'git rev-parse HEAD'.split()
ext.versionfile = new File("${projectDir}/.gitrevision")
standardOutput = new ByteArrayOutputStream()

doLast {
versionfile.text = "Azure/autorest#" + standardOutput.toString()
}
}

javadoc {
options.encoding = 'UTF-8'
}
Expand All @@ -78,14 +88,15 @@ task sourcesJar(type: Jar, dependsOn:classes) {
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
task javadocJar(type: Jar, dependsOn: [javadoc, versionInfo]) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
archives file: file("${projectDir}/.gitrevision")
}

test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class UserTokenCredentialsTests {
public void testAcquireToken() throws Exception {
credentials.refreshToken();
Assert.assertEquals("token1", credentials.getToken());
Thread.sleep(1000);
Thread.sleep(1500);
Assert.assertEquals("token2", credentials.getToken());
}

Expand Down Expand Up @@ -62,7 +62,7 @@ private void acquireAccessToken() throws IOException {
null,
"token1",
"refresh",
0,
1,
null,
null,
false);
Expand All @@ -73,7 +73,7 @@ private void acquireAccessTokenFromRefreshToken() throws IOException {
null,
"token2",
"refresh",
0,
1,
null,
null,
false);
Expand Down
13 changes: 12 additions & 1 deletion ClientRuntimes/Java/azure-client-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ test {
}
}

task versionInfo(type:Exec){
commandLine 'git rev-parse HEAD'.split()
ext.versionfile = new File("${projectDir}/.gitrevision")
standardOutput = new ByteArrayOutputStream()

doLast {
versionfile.text = "Azure/autorest#" + standardOutput.toString()
}
}

javadoc {
options.encoding = 'UTF-8'
}
Expand All @@ -78,14 +88,15 @@ task sourcesJar(type: Jar, dependsOn:classes) {
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
task javadocJar(type: Jar, dependsOn: [javadoc, versionInfo]) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
archives file: file("${projectDir}/.gitrevision")
}

test {
Expand Down
13 changes: 12 additions & 1 deletion ClientRuntimes/Java/client-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ test {
}
}

task versionInfo(type:Exec){
commandLine 'git rev-parse HEAD'.split()
ext.versionfile = new File("${projectDir}/.gitrevision")
standardOutput = new ByteArrayOutputStream()

doLast {
versionfile.text = "Azure/autorest#" + standardOutput.toString()
}
}

javadoc {
options.encoding = 'UTF-8'
}
Expand All @@ -87,14 +97,15 @@ task sourcesJar(type: Jar, dependsOn:classes) {
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
task javadocJar(type: Jar, dependsOn: [javadoc, versionInfo]) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
archives file: file("${projectDir}/.gitrevision")
}

test {
Expand Down